fix: recursive setTimeout, Strict Mode guard, isAxiosError

- Replace setInterval with recursive setTimeout to prevent overlapping async polls
- Add cancellation flag in auto-start effect for React Strict Mode double-mount
- Use isAxiosError() instead of unsafe type assertion
- Remove consumeCampaignSlug/consumeReferralCode from loginWithDeepLink (fired on every poll tick, destroying values after first 202)
This commit is contained in:
Fringg
2026-03-17 21:56:56 +03:00
parent 3d950252b7
commit b35000367b
2 changed files with 43 additions and 46 deletions

View File

@@ -320,8 +320,6 @@ export const useAuthStore = create<AuthState>()(
},
loginWithDeepLink: async (token) => {
consumeCampaignSlug();
consumeReferralCode();
const response = await authApi.pollDeepLinkToken(token);
tokenStorage.setTokens(response.access_token, response.refresh_token);
set({