kgabryje commented on code in PR #37459:
URL: https://github.com/apache/superset/pull/37459#discussion_r2841200201


##########
superset-frontend/src/dashboard/components/Header/index.tsx:
##########
@@ -302,72 +363,249 @@ const Header = (): ReactElement => {
     [dispatch],
   );
 
-  const startPeriodicRender = useCallback(
-    (interval: number) => {
-      let intervalMessage: string | undefined;
-
-      if (interval) {
-        const periodicRefreshOptions =
-          dashboardInfo.common?.conf?.DASHBOARD_AUTO_REFRESH_INTERVALS;
-        const predefinedValue = periodicRefreshOptions.find(
-          (option: [string, string]) => Number(option[0]) === interval / 1000,
-        );
+  const executeRefresh = useCallback(

Review Comment:
   Could we extract all that logic to a separate hook to make this file easier 
to read and maintain?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to