Remove close confirmation

This commit is contained in:
2024-10-03 22:30:00 +02:00
parent d21233a67f
commit 402d6b1623

View File

@@ -96,14 +96,9 @@ const Settings = ({ visible, onClose }) => {
const handleClose = useCallback(() => { const handleClose = useCallback(() => {
if (state.hasUnsavedChanges) { if (state.hasUnsavedChanges) {
const confirmClose = window.confirm( updateTheme(state.initialSettings.theme); // Revert theme if not saved
'You have unsaved changes. Are you sure you want to close without saving?' dispatch({ type: 'RESET' });
); onClose();
if (confirmClose) {
updateTheme(state.initialSettings.theme); // Revert theme if not saved
dispatch({ type: 'RESET' });
onClose();
}
} else { } else {
onClose(); onClose();
} }