cvpilot-tool/apps/desktop/src/main.tsx

12 lines
417 B
TypeScript
Raw Normal View History

2024-08-29 16:59:25 +08:00
import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import "@/style/global.css";
window.ipcRenderer.on("main-process-message", (_event, message) => {
const { platform, theme } = message
document.querySelector('html')?.setAttribute('platform', platform)
document.querySelector('html')?.setAttribute('theme', theme)
ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
});