aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/sidebar.js
diff options
context:
space:
mode:
authorWolfboy248 <121288977+Wolfboy248@users.noreply.github.com>2024-07-11 19:22:00 +0200
committerGitHub <noreply@github.com>2024-07-11 20:22:00 +0300
commit4bdb77287866c47f5b61d6472b3ff9cc4020f35e (patch)
treea8aac6098d991e5ae607dd7264f7bf2631d84e99 /frontend/src/components/sidebar.js
parentdocs: add wolfboy248 onto project team (#179) (diff)
downloadlphub-4bdb77287866c47f5b61d6472b3ff9cc4020f35e.tar.gz
lphub-4bdb77287866c47f5b61d6472b3ff9cc4020f35e.tar.bz2
lphub-4bdb77287866c47f5b61d6472b3ff9cc4020f35e.zip
fix: about page crash, update packages (#181)
Diffstat (limited to 'frontend/src/components/sidebar.js')
-rw-r--r--frontend/src/components/sidebar.js5
1 files changed, 3 insertions, 2 deletions
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();
46// Clicked buttons 46// Clicked buttons
47function SidebarClick(x){ 47function SidebarClick(x){
48const btn = document.querySelectorAll("button.sidebar-button"); 48const btn = document.querySelectorAll("button.sidebar-button");
49console.log(x)
49 50
50if(sidebar===1){setSidebar(0);SidebarHide()} 51if(sidebar===1){setSidebar(0);SidebarHide()}
51 52
@@ -104,8 +105,8 @@ React.useEffect(()=>{
104 if(location.pathname.includes("leaderboards")){SidebarClick(4)} 105 if(location.pathname.includes("leaderboards")){SidebarClick(4)}
105 if(location.pathname.includes("scorelog")){SidebarClick(5)} 106 if(location.pathname.includes("scorelog")){SidebarClick(5)}
106 if(location.pathname.includes("profile")){SidebarClick(6)} 107 if(location.pathname.includes("profile")){SidebarClick(6)}
107 if(location.pathname.includes("rules")){SidebarClick(9)} 108 if(location.pathname.includes("rules")){SidebarClick(8)}
108 if(location.pathname.includes("about")){SidebarClick(10)} 109 if(location.pathname.includes("about")){SidebarClick(9)}
109 110
110 // eslint-disable-next-line react-hooks/exhaustive-deps 111 // eslint-disable-next-line react-hooks/exhaustive-deps
111}, [location.pathname]) 112}, [location.pathname])