diff --git a/src/App.jsx b/src/App.jsx
index eec455c..e89faf0 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -4,48 +4,18 @@ import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom';
import { useAuth } from './auth/useAuth';
import LoginPage from './components/LoginPage';
import AppShell from './components/AppShell';
-import SectionPage from './pages/SectionPage';
-import SubPage from './pages/SubPage';
-import { NAV_ITEMS, SUB_NAV } from './nav';
-
-function sectionRoutes(path) {
- const subNav = SUB_NAV[path];
- const routePath = path === '/' ? undefined : path.slice(1);
-
- if (subNav) {
- return (
- }>
- {subNav.map(({ segment, label }) =>
- segment ? (
- }
- />
- ) : (
- } />
- ),
- )}
-
- );
- }
-
- const label = NAV_ITEMS.find((n) => n.path === path)?.label;
-
- if (path === '/') {
- return (
- } />
- );
- }
-
- return (
- }
- />
- );
-}
+import SectionLayout from './components/SectionLayout';
+import HomePage from './pages/index';
+import ArtikelUebersichtPage from './pages/artikel/index';
+import ArtikelKategorienPage from './pages/artikel/kategorien';
+import ArtikelLagerPage from './pages/artikel/lager';
+import LieferungPage from './pages/lieferung/index';
+import AuftragAktivePage from './pages/auftrag/index';
+import AuftragArchivPage from './pages/auftrag/archiv';
+import KundeListePage from './pages/kunde/index';
+import KundeGruppenPage from './pages/kunde/gruppen';
+import KundeKontaktePage from './pages/kunde/kontakte';
+import InfosPage from './pages/infos/index';
export default function App() {
const { status } = useAuth();
@@ -74,7 +44,23 @@ export default function App() {
}>
- {NAV_ITEMS.map((item) => sectionRoutes(item.path))}
+ } />
+ } />
+ } />
+ }>
+ } />
+ } />
+ } />
+
+ }>
+ } />
+ } />
+
+ }>
+ } />
+ } />
+ } />
+
} />
diff --git a/src/pages/SectionPage.jsx b/src/components/SectionLayout.jsx
similarity index 81%
rename from src/pages/SectionPage.jsx
rename to src/components/SectionLayout.jsx
index 35c6bcd..3cffc56 100644
--- a/src/pages/SectionPage.jsx
+++ b/src/components/SectionLayout.jsx
@@ -1,8 +1,8 @@
import { Outlet, useLocation } from 'react-router-dom';
-import PageLayout from '../components/PageLayout';
+import PageLayout from './PageLayout';
import { NAV_ITEMS, SUB_NAV } from '../nav';
-export default function SectionPage({ sectionPath, children }) {
+export default function SectionLayout({ sectionPath }) {
const { pathname } = useLocation();
const title = NAV_ITEMS.find((item) => item.path === sectionPath)?.label ?? '';
const subNav = SUB_NAV[sectionPath];
@@ -14,7 +14,7 @@ export default function SectionPage({ sectionPath, children }) {
return (
- {children ?? }
+
);
}
diff --git a/src/pages/SubPage.jsx b/src/pages/SubPage.jsx
deleted file mode 100644
index 5f18e34..0000000
--- a/src/pages/SubPage.jsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import Typography from '@mui/material/Typography';
-
-export default function SubPage({ title, description }) {
- return (
-
- {description ?? `${title} — Inhalt folgt.`}
-
- );
-}
diff --git a/src/pages/artikel/index.jsx b/src/pages/artikel/index.jsx
new file mode 100644
index 0000000..c0af29d
--- /dev/null
+++ b/src/pages/artikel/index.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function ArtikelUebersichtPage() {
+ return (
+ Übersicht — Inhalt folgt.
+ );
+}
diff --git a/src/pages/artikel/kategorien.jsx b/src/pages/artikel/kategorien.jsx
new file mode 100644
index 0000000..42487e2
--- /dev/null
+++ b/src/pages/artikel/kategorien.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function ArtikelKategorienPage() {
+ return (
+ Kategorien — Inhalt folgt.
+ );
+}
diff --git a/src/pages/artikel/lager.jsx b/src/pages/artikel/lager.jsx
new file mode 100644
index 0000000..8ba047f
--- /dev/null
+++ b/src/pages/artikel/lager.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function ArtikelLagerPage() {
+ return (
+ Lager — Inhalt folgt.
+ );
+}
diff --git a/src/pages/auftrag/archiv.jsx b/src/pages/auftrag/archiv.jsx
new file mode 100644
index 0000000..f7c381e
--- /dev/null
+++ b/src/pages/auftrag/archiv.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function AuftragArchivPage() {
+ return (
+ Archiv — Inhalt folgt.
+ );
+}
diff --git a/src/pages/auftrag/index.jsx b/src/pages/auftrag/index.jsx
new file mode 100644
index 0000000..3d07381
--- /dev/null
+++ b/src/pages/auftrag/index.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function AuftragAktivePage() {
+ return (
+ Aktive Aufträge — Inhalt folgt.
+ );
+}
diff --git a/src/pages/index.jsx b/src/pages/index.jsx
new file mode 100644
index 0000000..d508180
--- /dev/null
+++ b/src/pages/index.jsx
@@ -0,0 +1,10 @@
+import Typography from '@mui/material/Typography';
+import PageLayout from '../components/PageLayout';
+
+export default function HomePage() {
+ return (
+
+ Home — Inhalt folgt.
+
+ );
+}
diff --git a/src/pages/infos/index.jsx b/src/pages/infos/index.jsx
new file mode 100644
index 0000000..ddd6a16
--- /dev/null
+++ b/src/pages/infos/index.jsx
@@ -0,0 +1,10 @@
+import Typography from '@mui/material/Typography';
+import PageLayout from '../../components/PageLayout';
+
+export default function InfosPage() {
+ return (
+
+ Infos — Inhalt folgt.
+
+ );
+}
diff --git a/src/pages/kunde/gruppen.jsx b/src/pages/kunde/gruppen.jsx
new file mode 100644
index 0000000..7dc5729
--- /dev/null
+++ b/src/pages/kunde/gruppen.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function KundeGruppenPage() {
+ return (
+ Gruppen — Inhalt folgt.
+ );
+}
diff --git a/src/pages/kunde/index.jsx b/src/pages/kunde/index.jsx
new file mode 100644
index 0000000..07f4ba8
--- /dev/null
+++ b/src/pages/kunde/index.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function KundeListePage() {
+ return (
+ Kundenliste — Inhalt folgt.
+ );
+}
diff --git a/src/pages/kunde/kontakte.jsx b/src/pages/kunde/kontakte.jsx
new file mode 100644
index 0000000..ea61351
--- /dev/null
+++ b/src/pages/kunde/kontakte.jsx
@@ -0,0 +1,7 @@
+import Typography from '@mui/material/Typography';
+
+export default function KundeKontaktePage() {
+ return (
+ Kontakte — Inhalt folgt.
+ );
+}
diff --git a/src/pages/lieferung/index.jsx b/src/pages/lieferung/index.jsx
new file mode 100644
index 0000000..2bab0b5
--- /dev/null
+++ b/src/pages/lieferung/index.jsx
@@ -0,0 +1,10 @@
+import Typography from '@mui/material/Typography';
+import PageLayout from '../../components/PageLayout';
+
+export default function LieferungPage() {
+ return (
+
+ Lieferung — Inhalt folgt.
+
+ );
+}