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:12:04 UTC
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #902: fix: switch color modes in multiple tabs
juzhiyuan commented on a change in pull request #902:
URL: https://github.com/apache/apisix-website/pull/902#discussion_r814400255
##########
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:
How about using `setLightTheme(!isDarkTheme)`?
--
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