Add check for deletion of default config

This commit is contained in:
Manuel
2023-01-15 22:31:46 +01:00
parent 69199bdc9c
commit 0efc9ebb55
5 changed files with 42 additions and 13 deletions

View File

@@ -9,17 +9,6 @@ export const useDeleteConfigMutation = (configName: string) => {
return useMutation({
mutationKey: ['configs/delete', { configName }],
mutationFn: () => fetchDeletion(configName),
onSuccess() {
showNotification({
title: t('buttons.delete.notifications.deleted.title'),
icon: <IconCheck />,
color: 'green',
autoClose: 1500,
radius: 'md',
message: t('buttons.delete.notifications.deleted.message'),
});
// TODO: set config to default config and use fallback config if necessary
},
onError() {
showNotification({
title: t('buttons.delete.notifications.deleteFailed.title'),