perf: add staleTime to third-party auth context query

The TPA context is effectively static per session. Adding a 5-minute
staleTime prevents unnecessary background refetches when navigating
between login/register tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Adolfo R. Brandes
2026-03-06 19:26:43 -03:00
committed by Adolfo R. Brandes
parent fc40952da3
commit bb3ab6cba4

View File

@@ -10,6 +10,7 @@ const useThirdPartyAuthHook = (pageId, payload) => useQuery({
queryKey: ThirdPartyAuthQueryKeys.byPage(pageId),
queryFn: () => getThirdPartyAuthContext(payload),
retry: false,
staleTime: 5 * 60 * 1000, // 5 minutes — TPA context is effectively static per session
});
export {