SkyeYoung commented on a change in pull request #902:
URL: https://github.com/apache/apisix-website/pull/902#discussion_r814410086



##########
File path: website/src/pages/index.js
##########
@@ -28,14 +28,14 @@ const useWindowSize = () => {
 const ThemeResetComponent = () => {
   const {isDarkTheme, setLightTheme, setDarkTheme} = useThemeContext();
 
-  useEffect(() => {    
+  useEffect(() => {
     const children = 
document.querySelector(".navbar__items--right").childElementCount;
     
document.querySelector(".navbar__items--right").childNodes[children-2].style.display
 = "none";
 
     if(isDarkTheme) {

Review comment:
       @juzhiyuan Do you mean:
   ```diff
   - if(isDarkTheme){
   -   setLightTheme(true);
   - }
   + setLightTheme(!isDarkTheme)
   ```
   I have no plans to change this part of the code. 😳
   But, I'll try it.
   I think this might make the function execute more times. I'll check it right 
way.




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


Reply via email to