Stop refetching after pending

This commit is contained in:
Eric Bailey
2025-07-18 14:13:13 -05:00
parent d8e0df8eaa
commit 9c7178b756
+6
View File
@@ -121,6 +121,12 @@ export function Provider({children}: {children: React.ReactNode}) {
* that we get the latest state when the user returns to the app.
*/
setRefetchWhilePending(true)
} else if (
!!ageAssuranceContext.lastInitiatedAt &&
ageAssuranceContext.status !== 'pending' &&
refetchWhilePending
) {
setRefetchWhilePending(false)
}
const ageAssuranceAPIContext = useMemo<AgeAssuranceAPIContextType>(