🐛 Fix bug with notification

This commit is contained in:
ajnart
2023-03-21 11:39:34 +08:00
parent b923f8261b
commit c507a8892f

View File

@@ -18,7 +18,6 @@ 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...',
@@ -27,13 +26,13 @@ function ModalContent() {
setTimeout(() => {
window.location.reload();
}, 500);
} else {
})
.catch((_) => {
showNotification({
title: 'Wrong password',
message: 'The password you entered is wrong.',
title: 'Error',
message: 'Failed to toggle edit mode, please try again.',
color: 'red',
});
}
});
})}
>