Merge pull request #3208 from Infisical/fix/TagsDeleteButtonNotWorking

Use slug to check tag on remove icon click
This commit is contained in:
Maidul Islam
2025-03-09 22:32:36 -04:00
committed by GitHub
2 changed files with 5 additions and 4 deletions

View File

@@ -463,7 +463,7 @@ export const SecretDetailSidebar = ({
<div
className={`grid auto-cols-min grid-flow-col gap-2 overflow-hidden ${tagFields.fields.length > 0 ? "pt-2" : ""}`}
>
{tagFields.fields.map(({ tagColor, id: formId, slug, id }) => (
{tagFields.fields.map(({ tagColor, id: formId, slug }) => (
<Tag
className="flex w-min items-center space-x-2"
key={formId}
@@ -472,7 +472,8 @@ export const SecretDetailSidebar = ({
createNotification({ type: "error", text: "Access denied" });
return;
}
const tag = tags?.find(({ id: tagId }) => id === tagId);
const tag = tags?.find(({ slug: tagSlug }) => slug === tagSlug);
if (tag) handleTagSelect(tag);
}}
>

View File

@@ -241,8 +241,8 @@ export const SecretListView = ({
let successMessage;
if (isReminderEvent) {
successMessage = reminderRepeatDays
? "Successfully saved secret reminder"
successMessage = reminderRepeatDays
? "Successfully saved secret reminder"
: "Successfully deleted secret reminder";
} else {
successMessage = "Successfully saved secrets";