This commit is contained in:
Mikan
2026-06-19 19:14:27 +03:00
parent 2167493887
commit 32575e217e
23 changed files with 1191 additions and 92 deletions

View File

@@ -1,5 +1,7 @@
import { useEffect } from "react";
import { Routes, Route, Navigate } from "react-router-dom";
import { useAuthStore } from "@/store/auth";
import { useUiStore } from "@/store/ui";
import { Navbar } from "@/components/ui/Navbar";
import { HomePage } from "@/pages/HomePage";
import { LoginPage } from "@/pages/LoginPage";
@@ -26,6 +28,15 @@ function AdminRoute({ children }: { children: JSX.Element }) {
}
export default function App() {
// Load public UI settings (logo URL, etc.) once on app boot. These are
// unauthenticated and cached by the api layer, so subsequent navigations
// do not re-fetch. The admin panel calls load(true) after saving to
// pick up a new logo URL without a full page reload.
const loadUi = useUiStore((s) => s.load);
useEffect(() => {
loadUi();
}, [loadUi]);
return (
<div className="min-h-screen flex flex-col">
<Navbar />