Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Update SecretItem.tsx

Daniel Hougaardb74ce14d80aa
diff --git a/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx b/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx
index b175a0bca8..a72463c9ab 100644
--- a/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx
+++ b/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx
@@ -111,13 +111,12 @@ export const SecretItem = memo(
resolver: zodResolver(formSchema)
});
- const overrideAction = watch("overrideAction");
- const hasComment = Boolean(watch("comment"));
- const hasReminder = Boolean(watch("reminderRepeatDays"));
-
const secretReminderRepeatDays = watch("reminderRepeatDays");
const secretReminderNote = watch("reminderNote");
+ const overrideAction = watch("overrideAction");
+ const hasComment = Boolean(watch("comment"));
+
const selectedTags = watch("tags", []);
const selectedTagsGroupById = selectedTags.reduce<Record<string, boolean>>(
(prev, curr) => ({ ...prev, [curr.id]: true }),
@@ -385,7 +384,7 @@ export const SecretItem = memo(
<IconButton
className={twMerge(
"w-0 overflow-hidden p-0 group-hover:mr-2 group-hover:w-5 data-[state=open]:w-6",
- hasReminder && "w-5 text-primary"
+ Boolean(secretReminderRepeatDays) && "w-5 text-primary"
)}
variant="plain"
size="md"
@@ -393,7 +392,7 @@ export const SecretItem = memo(
>
<Tooltip
content={
- hasReminder
+ secretReminderRepeatDays && secretReminderRepeatDays > 0
? `Every ${secretReminderRepeatDays} day${
Number(secretReminderRepeatDays) > 1 ? "s" : ""
}