Skip to content

Commit

Permalink
Renamer fixes (#1125)
Browse files Browse the repository at this point in the history
* Use RenamerID to create a config instead of Name

* Fix delete issue with new configs
  • Loading branch information
harshithmohan authored Oct 25, 2024
1 parent d6cd6e2 commit b41f842
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Utilities/Renamer/ConfigModal.tsx
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ const ConfigModal = (props: Props) => {
disabled={rename}
>
{renamers?.map(renamer => (
<option key={renamer.Name} value={renamer.Name}>
<option key={renamer.RenamerID} value={renamer.RenamerID}>
{renamer.Name}
</option>
))}
2 changes: 1 addition & 1 deletion src/pages/utilities/Renamer.tsx
Original file line number Diff line number Diff line change
@@ -388,7 +388,7 @@ const Renamer = () => {
});

const handleDeleteConfig = useEventCallback(() => {
if (!newConfig || !renamer) return;
if (!renamer) return;
deleteConfig(selectedConfig.Name, {
onSuccess: () => toast.success(`"${selectedConfig.Name}" deleted successfully!`),
onError: () => toast.error(`"${selectedConfig.Name}" could not be deleted!`),

0 comments on commit b41f842

Please sign in to comment.