mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-12 00:15:48 +01:00
🐛 Fix bug with notification
This commit is contained in:
@@ -18,7 +18,6 @@ function ModalContent() {
|
|||||||
axios
|
axios
|
||||||
.post('/api/configs/tryPassword', { tried: values.triedPassword, type: 'edit' })
|
.post('/api/configs/tryPassword', { tried: values.triedPassword, type: 'edit' })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.success) {
|
|
||||||
showNotification({
|
showNotification({
|
||||||
title: 'Success',
|
title: 'Success',
|
||||||
message: 'Successfully toggled edit mode, reloading the page...',
|
message: 'Successfully toggled edit mode, reloading the page...',
|
||||||
@@ -27,13 +26,13 @@ function ModalContent() {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}, 500);
|
}, 500);
|
||||||
} else {
|
})
|
||||||
|
.catch((_) => {
|
||||||
showNotification({
|
showNotification({
|
||||||
title: 'Wrong password',
|
title: 'Error',
|
||||||
message: 'The password you entered is wrong.',
|
message: 'Failed to toggle edit mode, please try again.',
|
||||||
color: 'red',
|
color: 'red',
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user