From 4bdb77287866c47f5b61d6472b3ff9cc4020f35e Mon Sep 17 00:00:00 2001 From: Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> Date: Thu, 11 Jul 2024 19:22:00 +0200 Subject: fix: about page crash, update packages (#181) --- frontend/src/components/sidebar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'frontend/src/components/sidebar.js') diff --git a/frontend/src/components/sidebar.js b/frontend/src/components/sidebar.js index 6777867..08e9c6e 100644 --- a/frontend/src/components/sidebar.js +++ b/frontend/src/components/sidebar.js @@ -46,6 +46,7 @@ const [sidebar, setSidebar] = React.useState(); // Clicked buttons function SidebarClick(x){ const btn = document.querySelectorAll("button.sidebar-button"); +console.log(x) if(sidebar===1){setSidebar(0);SidebarHide()} @@ -104,8 +105,8 @@ React.useEffect(()=>{ if(location.pathname.includes("leaderboards")){SidebarClick(4)} if(location.pathname.includes("scorelog")){SidebarClick(5)} if(location.pathname.includes("profile")){SidebarClick(6)} - if(location.pathname.includes("rules")){SidebarClick(9)} - if(location.pathname.includes("about")){SidebarClick(10)} + if(location.pathname.includes("rules")){SidebarClick(8)} + if(location.pathname.includes("about")){SidebarClick(9)} // eslint-disable-next-line react-hooks/exhaustive-deps }, [location.pathname]) -- cgit v1.2.3