diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index bdc4cd4..f9010cc 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -74,6 +74,8 @@ const useStyles = makeStyles({ }, }) +let loaded = false + export const App = () => { const styles = useStyles() @@ -199,17 +201,19 @@ export const App = () => { }) }) Load().then(res => { - console.log(res) setSaveTo(res.save_to as SaveTo) setSavePath(res.path) + loaded = true }) }, []) useEffect(() => { - Save({ - save_to: saveTo, - path: savePath, - }).then(_ => {}) + if (loaded) { + Save({ + save_to: saveTo, + path: savePath, + }).then(_ => {}) + } }, [saveTo, savePath]) OnFileDrop((_x, _y, paths) => {