import { getCurrent } from "@tauri-apps/api/window"; import { useEffect, useRef } from "react"; import styles from "./MainWindow.module.scss"; import { SidebarSection } from "./sidebar_section/SidebarSection"; import { MainSection } from "./main_section/MainSection"; import { useStartPython } from "@logics/useStartPython"; export const MainWindow = () => { const { asyncStartPython } = useStartPython(); const hasRunRef = useRef(false); const main_window = getCurrent(); useEffect(() => { main_window.setDecorations(true); if (!hasRunRef.current) { asyncStartPython(); } return () => hasRunRef.current = true; }, []); return (
{t("main_window.cover_message")}