import { ThemeProvider } from "@/components/theme-provider"; import LayoutMain from "@/pages/Layout"; import { HashRouter as Router, Routes, Route } from "react-router-dom"; import Boot from "@/pages/Boot"; import { Setting } from "./pages/Setting"; import { useEffect } from "react"; import { Models } from "./pages/Models"; import { Tools } from "./pages/Tools"; import { Datasource } from "./pages/Datasource"; function App() { const theme = document.querySelector("html")!.getAttribute("theme") as | "dark" | "light"; /** * 等待渲染完成再显示窗口 */ useEffect(() => { window.ipcRenderer.send("ipc-loaded"); return () => { window.ipcRenderer.off("ipc-loaded", () => {}); }; }, []); return ( }> } /> } /> } /> } /> } /> ); } export default App;