From 6fb199105bc98c0d05c84a1189d424facf864a0a Mon Sep 17 00:00:00 2001 From: ajnart Date: Fri, 6 Jan 2023 01:10:16 +0900 Subject: [PATCH] Use ID for notification --- .../layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx b/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx index 09956261d..927d0aa3e 100644 --- a/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx +++ b/src/components/layout/header/Actions/ToggleEditMode/ToggleEditMode.tsx @@ -5,7 +5,7 @@ import { IconEditCircle, IconEditCircleOff } from '@tabler/icons'; import { getCookie } from 'cookies-next'; import { Trans, useTranslation } from 'next-i18next'; import { useEffect } from 'react'; -import { cleanNotifications, showNotification } from '@mantine/notifications'; +import { hideNotification, showNotification } from '@mantine/notifications'; import { useConfigContext } from '../../../../../config/provider'; import { useScreenSmallerThan } from '../../../../../hooks/useScreenSmallerThan'; @@ -47,12 +47,13 @@ export const ToggleEditModeAction = () => { }, }), radius: 'md', + id: 'toggle-edit-mode', autoClose: false, title: {t('popover.title')}, message: , }); } else { - cleanNotifications(); + hideNotification('toggle-edit-mode'); } }; const { primaryColor, secondaryColor } = useColorTheme();