[Update/bugfix] To get software version.(show it to the console for now.)

fix the error that was wrong amount arguments.
This commit is contained in:
Sakamoto Shiina
2024-08-08 16:36:40 +09:00
parent e9de5df8a5
commit e8fd6b724d
8 changed files with 66 additions and 8 deletions

View File

@@ -4,16 +4,23 @@ import styles from "./MainWindow.module.scss";
import { SidebarSection } from "./sidebar_section/SidebarSection";
import { MainSection } from "./main_section/MainSection";
import { useStartPython } from "@logics/useStartPython";
import { useConfig } from "@logics/useConfig";
export const MainWindow = () => {
const { asyncStartPython } = useStartPython();
const hasRunRef = useRef(false);
const main_window = getCurrent();
const { getSoftwareVersion } = useConfig();
useEffect(() => {
main_window.setDecorations(true);
if (!hasRunRef.current) {
asyncStartPython();
asyncStartPython().then((result) => {
getSoftwareVersion();
}).catch((err) => {
});
}
return () => hasRunRef.current = true;
}, []);