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