Skip to content

Commit 6f4ca58

Browse files
committed
stop trying to get the purchase orders when we already have them
1 parent 54683e0 commit 6f4ca58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pages/requests/[uuid].js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ const Request = () => {
4545
const [allPOs, setAllPOs] = useState([])
4646
const [isPOError, setIsPOError] = useState(false)
4747
const [isLoadingPOs, setIsLoadingPOs] = useState(true)
48+
4849
useEffect(() => {
49-
if (request) {
50+
if (isLoadingPOs && request) {
5051
(async () => {
5152
const { allPOs, isLoadingPOs, isPOError } = await getAllPOs(request?.quotedWareID, uuid, request?.identifier, accessToken)
5253

0 commit comments

Comments
 (0)