import { HamburgerMenuIcon } from "@radix-ui/react-icons"; import { useEffect, useState } from "react"; import { Outlet } from "react-router-dom"; import { main, navigation } from "../../configure.tsx"; import NavigationTree from "../../components/NavigationTree.tsx"; import Breadcrumbs from "../../components/Breadcrumbs.tsx"; import ConfirmationDialog from "../../components/ConfirmationDialog/ConfirmationDialog.tsx"; /** Here is located global wrapper for entire application, here you canfind: * - Drawer - contains navigation buttons * - Navbar - contains hamburger menu and theme selector * - Outlet - contains active page content * - App theme controll */ function App() { const [openDrawer, setOpenDrawer] = useState(false); useEffect(() => { document.querySelector("html")?.setAttribute("data-theme", "acid"); // To resolve this issue, you can use the import.meta.env object instead of process.env. The import.meta.env object is provided by Vite.js and allows you to access environment variables in your code. document.title = import.meta.env.VITE_APP_NAME; }, [openDrawer]); // Function on click drawer hamburger button const handleDrawerStatus = () => { setOpenDrawer(!openDrawer); }; return (
{/* Root drawer container */} {/* Drawer opening is controlled directly via css prop and next via local useState variable */}
{/* A hidden checkbox to toggle the visibility of the drawer */} {/* The actual drawer content */}
{/* Navbar */}
{/* Left side navbar */}

{main.program_name}

{/* Right side navbar */}
{main.program_version}
{/* App/active_drawer content */}
{/*Automatically generated breadcrumbs based on routing table from configuration file and active path*/} {/*Get active route and find it in routing file*/}
{/* Drawer sidebar wrapper */}
{/* Dark overlay on mobile devices, clickable to close drawer */}
); } export default App;