Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export const DeletePermission: React.FC<Props> = ({ trigger, permission }) => {
},
});

function handleDialogOpenChange(newState: boolean) {
setOpen(newState);
form.reset();
}
Comment on lines +67 to +70
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove duplicate function definition.

The handleDialogOpenChange function is defined twice with identical implementation. This appears to be a merge or copy-paste error.

Remove one of the duplicate function definitions:

-  function handleDialogOpenChange(newState: boolean) {
-    setOpen(newState);
-    form.reset();
-  }

Also applies to: 77-80

🧰 Tools
🪛 Biome

[error] 67-67: This function is unused.

Unused variables usually are result of incomplete refactoring, typos and other source of bugs.

(lint/correctness/noUnusedVariables)


async function onSubmit() {
deletePermission.mutate({ permissionId: permission.id });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export const DeleteRole: React.FC<Props> = ({ trigger, role }) => {
},
});

function handleDialogOpenChange(newState: boolean) {
setOpen(newState);
form.reset();
}
Comment on lines +68 to +71
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove duplicate function declaration.

The handleDialogOpenChange function is declared twice in the component. Remove the first declaration to fix the error.

- function handleDialogOpenChange(newState: boolean) {
-   setOpen(newState);
-   form.reset();
- }

Also applies to: 101-104

🧰 Tools
🪛 Biome

[error] 68-68: This function is unused.

Unused variables usually are result of incomplete refactoring, typos and other source of bugs.

(lint/correctness/noUnusedVariables)


async function onSubmit() {
deleteRole.mutate({ roleId: role.id });
}
Expand Down