base con autenticacion, registro, modulo encuestas
This commit is contained in:
12
apps/web/app/dashboard/page.tsx
Normal file
12
apps/web/app/dashboard/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { auth } from '@/lib/auth';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
export default async function Dashboard() {
|
||||
const session = await auth();
|
||||
|
||||
if (!session?.user) {
|
||||
return redirect('/');
|
||||
} else {
|
||||
redirect('/dashboard/inicio');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user