fix: only run when we have both the email and token
This commit is contained in:
parent
41bff5acdd
commit
c699672737
|
@ -32,6 +32,7 @@ function VerifyAuthenticated() {
|
||||||
const exchangeToken = useQuery({
|
const exchangeToken = useQuery({
|
||||||
queryKey: ["exchange-token", token],
|
queryKey: ["exchange-token", token],
|
||||||
retry: false,
|
retry: false,
|
||||||
|
enabled: !!user.data?.email && !!token,
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const ret= await sdk.account!().verifyEmail({
|
const ret= await sdk.account!().verifyEmail({
|
||||||
email: user.data?.email as string,
|
email: user.data?.email as string,
|
||||||
|
|
Loading…
Reference in New Issue