feat: založení základní stránky příjem/výdej + import a statistiky

This commit is contained in:
Ondřej Anděl committed 2026-09-07 14:58:49 +02:00
commit a5711f3e1e
98 files changed
+15505

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
import { Routes, Route, Navigate } from "react-router-dom";
import { ToastContainer } from "react-toastify";
import { useAuth } from "./context/auth";
import Header from "./components/Header";
import Login from "./Login";
import DayPage from "./pages/DayPage";
import StatsPage from "./pages/StatsPage";
import { DEN_URL, STATISTIKY_URL } from "./routes";
export default function AppRoutes() {
const auth = useAuth();
if (!auth?.login) {
return <Login />;
}
return (
<div className="app-container">
<Header />
<div className="wrapper">
<Routes>
<Route path={DEN_URL} element={<DayPage />} />
<Route path={STATISTIKY_URL} element={<StatsPage />} />
<Route path="*" element={<Navigate to={DEN_URL} replace />} />
</Routes>
</div>
<ToastContainer position="bottom-right" />
</div>
);
}