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