Initial React project

This commit is contained in:
Johan
2026-03-05 00:02:32 +01:00
parent 01363820e2
commit cfecd57b85
17 changed files with 1193 additions and 16 deletions

View File

@@ -6,6 +6,7 @@ import { CareerAgentPage } from './presentation/ai-agent/pages/CareerAgentPage';
import { CvPage } from './presentation/cv/pages/CvPage';
import type { DashboardNavKey } from './presentation/dashboard/components/DashboardSidebar';
import { DashboardPage } from './presentation/dashboard/pages/DashboardPage';
import { HomePage } from './presentation/home/pages/HomePage';
import { JobDetailPage } from './presentation/jobs/pages/JobDetailPage';
import { JobsPage } from './presentation/jobs/pages/JobsPage';
import { MessagesPage } from './presentation/messages/pages/MessagesPage';
@@ -25,6 +26,7 @@ interface JobDetailSelection {
}
function App() {
const isHomeRoute = useMemo(() => window.location.pathname === '/home', []);
const initialAuthenticated = useMemo(() => Boolean(window.localStorage.getItem('token')), []);
const initialTheme = useMemo<'light' | 'dark'>(() => {
const stored = window.localStorage.getItem('theme');
@@ -85,6 +87,10 @@ function App() {
});
}
if (isHomeRoute) {
return <HomePage />;
}
if (!isAuthenticated) {
return <AuthPage onAuthenticated={() => setIsAuthenticated(true)} />;
}