bbovenzi commented on code in PR #35393:
URL: https://github.com/apache/airflow/pull/35393#discussion_r1409626735


##########
airflow/www/static/js/dag/details/dagRun/ClearRun.tsx:
##########
@@ -59,31 +60,67 @@ const ClearRun = ({ runId, ...otherProps }: Props) => {
     onQueue({ confirmed: true });
   };
 
-  useKeysPress(keyboardShortcutIdentifier.dagRunClear, clearExistingTasks);
+  const [showConfirmationModal, setShowConfirmationModal] = useState(false);
+  const [doNotShowAgain, setDoNotShowAgain] = useState(false);
+
+  useEffect(() => {
+    const storedValue = localStorage.getItem("doNotShowAgain");
+    if (storedValue) {
+      setDoNotShowAgain(JSON.parse(storedValue));
+    }
+  }, []);

Review Comment:
   This doesn't need to be in `useEffect` we can just check this in the line 
before our useState and then set it as the default. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to