"use client"; import "./App.scss"; import Sign_in from "./sign_in"; import Sign_up from "./sign_up"; import Dashboard from "./dash"; import { useState, useEffect } from "react"; import { BrowserRouter as Router, Route, Routes, useNavigate, } from "react-router-dom"; import { Button } from "./components/ui/button"; import { useAlert } from "./alert"; import SplashScreen from "./splashscreen"; import { getShowSplash, setShowSplash } from "./global"; function App() { const { triggerAlert, AlertComponent } = useAlert(); const [showSplash, setShowSplashState] = useState(getShowSplash()); useEffect(() => { if (showSplash) { const splashTimeout = setTimeout(() => { setShowSplashState(false); setShowSplash(false); }, 5000); return () => clearTimeout(splashTimeout); } }, [showSplash]); if (showSplash) { return ; } return (
{AlertComponent} } /> } /> } /> } />
); } function Home({ triggerAlert, }: { triggerAlert: ( title: string, description: string, type?: "default" | "error", ) => void; }) { const nav = useNavigate(); return ( <>

Welcome to Tauri + React

); } export default App;