import "./App.css"; import { useState, ReactElement } from "react"; import { Cog6ToothIcon, HomeIcon, ClockIcon, WrenchScrewdriverIcon, } from "@heroicons/react/24/outline"; import Logo from "./assets/logo-light.svg"; function classNames(...classes: any) { return classes.filter(Boolean).join(" "); } import Home from "./pages/Home.tsx"; import History from "./pages/History.tsx"; import Dotfiles from "./pages/Dotfiles.tsx"; enum Section { Home, History, Dotfiles, } function renderMain(section: Section): ReactElement { switch (section) { case Section.Home: return ; case Section.History: return ; case Section.Dotfiles: return ; } } function App() { // routers don't really work in Tauri. It's not a browser! // I think hashrouter may work, but I'd rather avoiding thinking of them as // pages const [section, setSection] = useState(Section.Home); const navigation = [ { name: "Home", icon: HomeIcon, section: Section.Home, }, { name: "History", icon: ClockIcon, section: Section.History, }, { name: "Dotfiles", icon: WrenchScrewdriverIcon, section: Section.Dotfiles, }, ]; return (
Atuin
{renderMain(section)}
); } export default App;