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



##########
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 Sorry, I made a mistake. The intent of this part of the code 
is to reset the color mode to `light mode`. The above changes will not achieve 
this goal
   
   If you mean, change `setLightTheme(true)`  to `setLightTheme(!isDarkTheme)`. 
I think it might be clearer to use `ture` as a parameter.




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