disable email query if takendown
This commit is contained in:
@@ -47,7 +47,7 @@ export function useAccountEmailState() {
|
||||
email2FAEnabled: !!agent.session?.emailAuthFactor,
|
||||
}
|
||||
const query = useQuery<AccountEmailState>({
|
||||
enabled: !!agent.session,
|
||||
enabled: !!agent.session && agent.session.status !== 'takendown',
|
||||
refetchOnWindowFocus: true,
|
||||
queryKey: accountEmailStateQueryKey,
|
||||
queryFn: async () => {
|
||||
|
||||
@@ -119,7 +119,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
)
|
||||
|
||||
const logoutCurrentAccount = React.useCallback<
|
||||
SessionApiContext['logoutEveryAccount']
|
||||
SessionApiContext['logoutCurrentAccount']
|
||||
>(
|
||||
logContext => {
|
||||
addSessionDebugLog({type: 'method:start', method: 'logout'})
|
||||
|
||||
Reference in New Issue
Block a user