Sprint 8: modernes Design-System für die React-PWA
Gemeinsames Stylesheet (Tokens, Karten, Buttons, Badges, Formulare) plus AppShell (Kopfzeile mit Navigation/Logout) statt Inline-Styles je Screen. Kein UI-Framework als neue Abhängigkeit - schlankes eigenes CSS, damit Build/Deploy-Weg unverändert bleibt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L85hmKbvX7Cqkq47KnQhFt
This commit is contained in:
@@ -2,6 +2,7 @@ import type { ReactNode } from "react";
|
||||
import { Navigate, Route, Routes } from "react-router-dom";
|
||||
|
||||
import { AuthProvider, useAuth } from "./auth/AuthContext";
|
||||
import { AppShell } from "./components/AppShell";
|
||||
import { AdminPage } from "./pages/AdminPage";
|
||||
import { KontrollPage } from "./pages/KontrollPage";
|
||||
import { LoginPage } from "./pages/LoginPage";
|
||||
@@ -12,7 +13,7 @@ function GeschuetzteRoute({ children }: { children: ReactNode }) {
|
||||
if (!eingeloggt) {
|
||||
return <Navigate to="/login" replace />;
|
||||
}
|
||||
return <>{children}</>;
|
||||
return <AppShell>{children}</AppShell>;
|
||||
}
|
||||
|
||||
function AdminRoute({ children }: { children: ReactNode }) {
|
||||
@@ -23,7 +24,7 @@ function AdminRoute({ children }: { children: ReactNode }) {
|
||||
if (!istAdmin) {
|
||||
return <Navigate to="/objekte" replace />;
|
||||
}
|
||||
return <>{children}</>;
|
||||
return <AppShell>{children}</AppShell>;
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
|
||||
Reference in New Issue
Block a user