Skip to content

Commit

Permalink
Revert "chore: remove redirect"
Browse files Browse the repository at this point in the history
This reverts commit 589c9ed.
  • Loading branch information
apotdevin committed Jun 17, 2024
1 parent d6ede95 commit 75ab244
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use client';

// import { redirect } from 'next/navigation';
import { redirect } from 'next/navigation';

import { AppLayout } from '@/components/layout/AppLayout';
import { useUserQuery } from '@/graphql/queries/__generated__/user.generated';
// import { ROUTES } from '@/utils/routes';
import { ROUTES } from '@/utils/routes';

export default function Layout({
children,
Expand All @@ -18,8 +18,7 @@ export default function Layout({
}

if (error || !data?.user.id) {
// redirect(ROUTES.login);
return null;
redirect(ROUTES.login);
}

return <AppLayout>{children}</AppLayout>;
Expand Down

0 comments on commit 75ab244

Please sign in to comment.