mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
Use ID for notification
This commit is contained in:
@@ -5,7 +5,7 @@ import { IconEditCircle, IconEditCircleOff } from '@tabler/icons';
|
|||||||
import { getCookie } from 'cookies-next';
|
import { getCookie } from 'cookies-next';
|
||||||
import { Trans, useTranslation } from 'next-i18next';
|
import { Trans, useTranslation } from 'next-i18next';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { cleanNotifications, showNotification } from '@mantine/notifications';
|
import { hideNotification, showNotification } from '@mantine/notifications';
|
||||||
import { useConfigContext } from '../../../../../config/provider';
|
import { useConfigContext } from '../../../../../config/provider';
|
||||||
import { useScreenSmallerThan } from '../../../../../hooks/useScreenSmallerThan';
|
import { useScreenSmallerThan } from '../../../../../hooks/useScreenSmallerThan';
|
||||||
|
|
||||||
@@ -47,12 +47,13 @@ export const ToggleEditModeAction = () => {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
radius: 'md',
|
radius: 'md',
|
||||||
|
id: 'toggle-edit-mode',
|
||||||
autoClose: false,
|
autoClose: false,
|
||||||
title: <Title order={4}>{t('popover.title')}</Title>,
|
title: <Title order={4}>{t('popover.title')}</Title>,
|
||||||
message: <Trans i18nKey="layout/header/actions/toggle-edit-mode:popover.text" />,
|
message: <Trans i18nKey="layout/header/actions/toggle-edit-mode:popover.text" />,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
cleanNotifications();
|
hideNotification('toggle-edit-mode');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const { primaryColor, secondaryColor } = useColorTheme();
|
const { primaryColor, secondaryColor } = useColorTheme();
|
||||||
|
|||||||
Reference in New Issue
Block a user