import "./App.css";
import { useState, ReactElement } from "react";
import { useStore } from "@/state/store";
import Button, { ButtonStyle } from "@/components/Button";
import { Toaster } from "@/components/ui/toaster";
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import {
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";
import LoginOrRegister from "./components/LoginOrRegister.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 user = useStore((state) => state.user);
console.log(user);
const navigation = [
{
name: "Home",
icon: HomeIcon,
section: Section.Home,
},
{
name: "History",
icon: ClockIcon,
section: Section.History,
},
{
name: "Dotfiles",
icon: WrenchScrewdriverIcon,
section: Section.Dotfiles,
},
];
return (
{renderMain(section)}
);
}
export default App;