[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:
@@ -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;
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user