diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 2d62989..3709ca9 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -1,27 +1,37 @@ import { Navigate, Route, Routes } from "react-router-dom"; import { RedirectIfAuthenticated } from "./features/auth/RedirectIfAuthenticated"; import { RequireAuth } from "./features/auth/RequireAuth"; +import { AppLayout } from "./layouts/AppLayout"; import { HomePage } from "./pages/HomePage"; +import { HouseholdPage } from "./pages/HouseholdPage"; import { LoginPage } from "./pages/LoginPage"; +import { RecipesPage } from "./pages/RecipesPage"; +import { ShoppingListPage } from "./pages/ShoppingListPage"; import { SignupPage } from "./pages/SignupPage"; /** - * Top-level route table. `/` requires an authenticated session (see - * {@link RequireAuth}); `/login` and `/signup` redirect an already-logged-in - * visitor to `/` instead (see {@link RedirectIfAuthenticated}). Anything - * else falls back to `/`, which itself redirects to `/login` if needed. + * Top-level route table. Every authenticated section is nested under one + * `RequireAuth` + `AppLayout` parent route (sidebar chrome + `/auth` + * guard applied once, not per-page — see {@link AppLayout}); `/login` and + * `/signup` redirect an already-logged-in visitor to `/` instead (see + * {@link RedirectIfAuthenticated}). Anything else falls back to `/`, which + * itself redirects to `/login` if needed. */ export function App() { return ( - + } - /> + > + } /> + } /> + } /> + } /> + +

{title}

+

{description}

+ + ); +} diff --git a/apps/web/src/pages/HouseholdPage.tsx b/apps/web/src/pages/HouseholdPage.tsx new file mode 100644 index 0000000..8502f37 --- /dev/null +++ b/apps/web/src/pages/HouseholdPage.tsx @@ -0,0 +1,8 @@ +import { useTranslation } from "react-i18next"; +import { ComingSoonPage } from "./ComingSoonPage"; + +/** Household & profile section — routed at `/foyer`. No backend yet beyond auth, stub for now. */ +export function HouseholdPage() { + const { t } = useTranslation(); + return ; +} diff --git a/apps/web/src/pages/RecipesPage.tsx b/apps/web/src/pages/RecipesPage.tsx new file mode 100644 index 0000000..e7080fc --- /dev/null +++ b/apps/web/src/pages/RecipesPage.tsx @@ -0,0 +1,8 @@ +import { useTranslation } from "react-i18next"; +import { ComingSoonPage } from "./ComingSoonPage"; + +/** Recipes section — routed at `/recettes`. No backend yet (see README's "Planning" section), stub for now. */ +export function RecipesPage() { + const { t } = useTranslation(); + return ; +} diff --git a/apps/web/src/pages/ShoppingListPage.tsx b/apps/web/src/pages/ShoppingListPage.tsx new file mode 100644 index 0000000..090be39 --- /dev/null +++ b/apps/web/src/pages/ShoppingListPage.tsx @@ -0,0 +1,10 @@ +import { useTranslation } from "react-i18next"; +import { ComingSoonPage } from "./ComingSoonPage"; + +/** Shopping list section — routed at `/liste-de-courses`. No backend yet, stub for now. */ +export function ShoppingListPage() { + const { t } = useTranslation(); + return ( + + ); +}