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 2022/02/25 01:38:07 UTC

[GitHub] [apisix-website] SkyeYoung commented on a change in pull request #902: fix: switch color modes in multiple tabs

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:
       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: notifications-unsubscribe@apisix.apache.org

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