inital working version

This commit is contained in:
Stefan Hardegger
2025-07-22 21:49:40 +02:00
parent bebb799784
commit 59d29dceaf
98 changed files with 8027 additions and 856 deletions

27
frontend/src/app/page.tsx Normal file
View File

@@ -0,0 +1,27 @@
'use client';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { useAuth } from '../contexts/AuthContext';
import LoadingSpinner from '../components/ui/LoadingSpinner';
export default function HomePage() {
const { isAuthenticated, loading } = useAuth();
const router = useRouter();
useEffect(() => {
if (!loading) {
if (isAuthenticated) {
router.push('/library');
} else {
router.push('/login');
}
}
}, [isAuthenticated, loading, router]);
return (
<div className="min-h-screen flex items-center justify-center theme-bg">
<LoadingSpinner />
</div>
);
}