Skip to content

Commit

Permalink
fix hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhdanh27600 committed Oct 12, 2023
1 parent 670f4e1 commit 6f832a9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/pages/auth/verify-request.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ export default function VerifyRequest(/* {}: InferGetServerSidePropsType<typeof
const router = useRouter();
const { data: session } = useSession();

if (!!session) {
router.replace('/');
return null;
}

useEffect(() => {
if (getLanguage(location.href) !== locale) {
router.replace(linkWithLanguage(location.href, locale));
}
}, []);

if (!!session) {
router.replace('/');
return null;
}
return (
<LayoutMain featureTab={false}>
<div className="m-auto w-full max-w-lg rounded-lg border border-gray-200 bg-gray-50 p-16 shadow">
Expand Down

0 comments on commit 6f832a9

Please sign in to comment.