Initial commit: Kalendartool (Next.js, Prisma, Docker)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
11
app/page.tsx
Normal file
11
app/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Startseite: leitet angemeldete Benutzer zum Dashboard weiter,
|
||||
* unangemeldete zur Anmeldung.
|
||||
*/
|
||||
import { redirect } from 'next/navigation';
|
||||
import { tryGetAuthenticatedUser } from '@/lib/auth/session';
|
||||
|
||||
export default async function HomePage() {
|
||||
const user = await tryGetAuthenticatedUser();
|
||||
redirect(user ? '/dashboard' : '/login');
|
||||
}
|
||||
Reference in New Issue
Block a user