Skip to content

Commit

Permalink
fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Apr 24, 2023
1 parent 1ac3838 commit 249ce32
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,19 @@ export function RuleSnoozeBadge({
const hasCRUDPermissions = hasUserCRUDPermission(canUserCRUD);
const invalidateFetchRuleSnoozeSettings = useInvalidateFetchRulesSnoozeSettingsQuery();
const isLoading = !snoozeSettings;
const rule = useMemo(() => {
return {
...snoozeSettings,
const rule = useMemo(
() => ({
id: snoozeSettings?.id ?? '',
muteAll: snoozeSettings?.muteAll ?? false,
activeSnoozes: snoozeSettings?.activeSnoozes ?? [],
isSnoozedUntil: snoozeSettings?.isSnoozedUntil
? new Date(snoozeSettings.isSnoozedUntil)
: undefined,
snoozeSchedule: snoozeSettings?.snoozeSchedule,
isEditable: hasCRUDPermissions,
};
}, [snoozeSettings, hasCRUDPermissions]);
}),
[snoozeSettings, hasCRUDPermissions]
);

if (error) {
return (
Expand Down

0 comments on commit 249ce32

Please sign in to comment.