Skip to content

Commit

Permalink
Update SecretItem.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Feb 15, 2024
1 parent 120d7e4 commit b74ce14
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand Down Expand Up @@ -385,15 +384,15 @@ 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"
ariaLabel="add-reminder"
>
<Tooltip
content={
hasReminder
secretReminderRepeatDays && secretReminderRepeatDays > 0
? `Every ${secretReminderRepeatDays} day${
Number(secretReminderRepeatDays) > 1 ? "s" : ""
}
Expand Down

0 comments on commit b74ce14

Please sign in to comment.