dmeo-app
This commit is contained in:
parent
5e4525e979
commit
e63f0bc7a7
242 changed files with 22660 additions and 5953 deletions
14
src/app/private/page.tsx
Normal file
14
src/app/private/page.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { redirect } from 'next/navigation';
|
||||
|
||||
import { createClient } from '@/utils/supabase/server';
|
||||
|
||||
export default async function PrivatePage() {
|
||||
const supabase = await createClient();
|
||||
|
||||
const { data, error } = await supabase.auth.getUser();
|
||||
if (error || !data?.user) {
|
||||
redirect('/login');
|
||||
}
|
||||
|
||||
return redirect('/');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue