Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmatthewnguyen105 committed Dec 13, 2023
1 parent 1574cf5 commit cddd220
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/_node/file/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ export type TProjectLoaderResponse = {
};

export type TFileApiPayloadBase = {
// addInvalidNodes: (...uids: string[]) => void;
// removeInvalidNodes: (...uids: string[]) => void;
// addTemporaryNodes: (...uids: string[]) => void;
// removeTemporaryNodes: (...uids: string[]) => void;
projectContext: TProjectContext;
action: TFileActionType;
fileTree: TFileNodeTreeData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ export const useNodeActionsHandler = ({
if (uids.length === 0) return;

const message = `Are you sure you want to delete them? This action cannot be undone!`;
triggerAlert(message);
if (!window.confirm(message)) {
return;
}

addRunningActions(["fileTreeView-delete"]);
addInvalidNodes(...uids);
Expand All @@ -325,10 +327,10 @@ export const useNodeActionsHandler = ({
removeInvalidNodes(...uids);
removeRunningActions(["fileTreeView-delete"]);
}, [
addRunningActions,
removeRunningActions,
selectedItems,
invalidNodes,
addRunningActions,
removeRunningActions,
addInvalidNodes,
removeInvalidNodes,
project,
Expand Down

0 comments on commit cddd220

Please sign in to comment.