Shun Miyazawa hace 3 años
padre
commit
6fcd3f2152
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      packages/app/src/components/UnsavedAlertDialog.tsx

+ 3 - 1
packages/app/src/components/UnsavedAlertDialog.tsx

@@ -23,9 +23,11 @@ const UnsavedAlertDialog = (): JSX.Element => {
 
 
   const alertUnsavedWarningByNextRouter = useCallback(() => {
   const alertUnsavedWarningByNextRouter = useCallback(() => {
     if (isEnabledUnsavedWarning) {
     if (isEnabledUnsavedWarning) {
-    // eslint-disable-next-line no-alert
+      // eslint-disable-next-line no-alert
       window.alert(t('page_edit.changes_not_saved'));
       window.alert(t('page_edit.changes_not_saved'));
 
 
+      // Execute only when window.alert is displayed
+      // Do not execute when the dialog is displayed
       mutateIsEnabledUnsavedWarning(false);
       mutateIsEnabledUnsavedWarning(false);
     }
     }
     return;
     return;