You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/07/27 17:45:38 UTC

[GitHub] [druid] jgoz commented on a change in pull request #11503: Web console: Update awesome-code-style

jgoz commented on a change in pull request #11503:
URL: https://github.com/apache/druid/pull/11503#discussion_r677668445



##########
File path: web-console/src/components/timed-button/timed-button.tsx
##########
@@ -42,7 +42,7 @@ export const TimedButton = React.memo(function TimedButton(props: TimedButtonPro
     label,
     delays,
     onRefresh,
-    type,
+    type: _type,

Review comment:
       `type` is unused, and prefixing with `_` allows it to exist

##########
File path: web-console/src/views/query-view/query-output/query-output.tsx
##########
@@ -99,9 +99,9 @@ export const QueryOutput = React.memo(function QueryOutput(props: QueryOutputPro
 
   // Reset page to 0 if number of results changes
   useEffect(() => {
-    if (pagination.page) {
-      setPagination(changePage(pagination, 0));
-    }
+    setPagination(pagination => {
+      return pagination.page ? changePage(pagination, 0) : pagination;
+    });

Review comment:
       This was a change to avoid adding `pagination.page` to the dependencies list per eslint-plugin-react-hooks.




-- 
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-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org