Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmatthewnguyen105 committed Dec 21, 2023
1 parent 6f42a12 commit 3c21480
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -19,7 +18,7 @@ export const useDefaultFileCreate = () => {
fileHandlers[RootNodeUid]
) {
createDefaultFile(fileHandlers);
reloadCurrentProject(fileTree, currentProjectFileHandle);
reloadCurrentProject();
dispatch(setShowActionsPanel(true));
}
}, [fileTree[RootNodeUid]?.children, fileHandlers[RootNodeUid]]);
Expand Down

0 comments on commit 3c21480

Please sign in to comment.