Skip to content

Commit

Permalink
fix: redirect to home page in case of no email in email verification …
Browse files Browse the repository at this point in the history
…page
  • Loading branch information
mpblocky committed Feb 27, 2025
1 parent d2c15e3 commit fa8dcaa
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useNavigate } from 'react-router-dom';
import { PageCard, PageCardLoader } from '@/shared/components/ui/page-card';
import { Navigate, useNavigate } from 'react-router-dom';
import { PageCard } from '@/shared/components/ui/page-card';
import { Alert } from '@/shared/components/ui/alert';
import { getErrorMessageForError } from '@/shared/errors';
import { useAuth } from '@/modules/auth/hooks/use-auth';
Expand All @@ -21,7 +21,7 @@ export function EmailVerificationFormContainer() {
};

if (!routerState?.email) {
return <PageCardLoader />;
return <Navigate to={routerPaths.homePage} />;
}

const alertComponent = methods.formState.isSubmitSuccessful ? (
Expand Down

0 comments on commit fa8dcaa

Please sign in to comment.