You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/05 22:59:17 UTC

[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1435: feat: show warning notification when dashboard version not matching apisix

liuxiran commented on a change in pull request #1435:
URL: https://github.com/apache/apisix-dashboard/pull/1435#discussion_r571296343



##########
File path: web/src/components/RightContent/index.tsx
##########
@@ -49,6 +51,9 @@ const GlobalHeaderRight: React.FC = () => {
   if ((navTheme === 'dark' && layout === 'top') || layout === 'mix') {
     className = `${styles.right}  ${styles.dark}`;
   }
+  useEffect(() => {

Review comment:
       > Don’t call Hooks inside loops, conditions, or nested functions. Instead, always use Hooks at the top level of your React function. You can follow the documentation here. (from https://stackoverflow.com/questions/57620799/react-hook-useeffect-is-called-conditionally)
   
   just move this `useEffect` before line 44




----------------------------------------------------------------
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.

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