diff --git a/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts b/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts index 129302a2..a7de8cf1 100644 --- a/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts +++ b/src/components/main/actionsPanel/workspaceTreeView/hooks/useCmdk.ts @@ -105,7 +105,7 @@ export const useCmdk = ({ LogAllow && console.error("error while removing file system"); }, (allDone: boolean) => { - reloadCurrentProject(fileTree, currentProjectFileHandle); + reloadCurrentProject(); LogAllow && console.log( allDone ? "all is successfully removed" : "some is not removed", @@ -133,7 +133,7 @@ export const useCmdk = ({ LogAllow && console.error("error while removing file system"); }, (allDone: boolean) => { - reloadCurrentProject(fileTree, currentProjectFileHandle); + reloadCurrentProject(); LogAllow && console.log( allDone ? "all is successfully removed" : "some is not removed", diff --git a/src/components/main/actionsPanel/workspaceTreeView/hooks/useDefaultFile.tsx b/src/components/main/actionsPanel/workspaceTreeView/hooks/useDefaultFile.tsx index aea1c6d2..0c363395 100644 --- a/src/components/main/actionsPanel/workspaceTreeView/hooks/useDefaultFile.tsx +++ b/src/components/main/actionsPanel/workspaceTreeView/hooks/useDefaultFile.tsx @@ -8,8 +8,7 @@ import { createDefaultFile } from "../helpers/createDefaultFile"; export const useDefaultFileCreate = () => { const { fileTree } = useAppState(); - const { fileHandlers, reloadCurrentProject, currentProjectFileHandle } = - useContext(MainContext); + const { fileHandlers, reloadCurrentProject } = useContext(MainContext); const dispatch = useDispatch(); @@ -19,7 +18,7 @@ export const useDefaultFileCreate = () => { fileHandlers[RootNodeUid] ) { createDefaultFile(fileHandlers); - reloadCurrentProject(fileTree, currentProjectFileHandle); + reloadCurrentProject(); dispatch(setShowActionsPanel(true)); } }, [fileTree[RootNodeUid]?.children, fileHandlers[RootNodeUid]]);