import { BrowserRouter, Route, Routes, useLocation } from "react-router"; import { usePath } from "./store/path"; import { useEffect, useState } from "react"; import "./App.scss"; import kuma from "./assets/kuma.png"; import { Menu, PanelLeftClose } from "lucide-react"; function App() { return ( } /> ); } function Dashboard() { const path = usePath(); const location = useLocation(); const [load, setLoad] = useState(false); useEffect(() => { if (!load) { path.update(location.pathname.substring(1, location.pathname.length)); setLoad(true); } const id = setInterval(() => { path.update(location.pathname.substring(1, location.pathname.length)); }, 5000); return () => clearInterval(id); }, [load, path, location]); return (
); } function Header() { const [open, setOpen] = useState(false); return ( ); } // TODO: create menu modal function MenuView({ open, setOpen }: { open: boolean; setOpen: (value: boolean) => void }) { return (
{ ev.preventDefault(); setOpen(false); }}> Close
); } export default App;