From 2303fe299098c445754943e0a4f2ef7630e22bf5 Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Wed, 4 Sep 2024 11:57:44 +0300
Subject: refactor: update sidebar for core pages, small fix in modmenu

---
 frontend/src/components/Sidebar.tsx | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

(limited to 'frontend/src/components/Sidebar.tsx')

diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx
index a8834b6..d303927 100644
--- a/frontend/src/components/Sidebar.tsx
+++ b/frontend/src/components/Sidebar.tsx
@@ -90,13 +90,13 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile }) => {
 
   React.useEffect(() => {
     if (path === "/") { handle_sidebar_click(1) }
-    else if (path.includes("news")) { handle_sidebar_click(2) }
-    else if (path.includes("games")) { handle_sidebar_click(3) }
-    else if (path.includes("leaderboards")) { handle_sidebar_click(4) }
-    else if (path.includes("scorelog")) { handle_sidebar_click(5) }
-    else if (path.includes("profile")) { handle_sidebar_click(6) }
-    else if (path.includes("rules")) { handle_sidebar_click(8) }
-    else if (path.includes("about")) { handle_sidebar_click(9) }
+    else if (path.includes("games")) { handle_sidebar_click(2) }
+    else if (path.includes("rankings")) { handle_sidebar_click(3) }
+    // else if (path.includes("news")) { handle_sidebar_click(4) }
+    // else if (path.includes("scorelog")) { handle_sidebar_click(5) }
+    else if (path.includes("profile")) { handle_sidebar_click(4) }
+    else if (path.includes("rules")) { handle_sidebar_click(5) }
+    else if (path.includes("about")) { handle_sidebar_click(6) }
   }, [path]);
 
   return (
@@ -121,21 +121,21 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile }) => {
             <button className='sidebar-button'><img src={HomeIcon} alt="homepage" /><span>Home&nbsp;Page</span></button>
           </Link>
 
-          <Link to="/news" tabIndex={-1}>
-            <button className='sidebar-button'><img src={NewsIcon} alt="news" /><span>News</span></button>
-          </Link>
-
           <Link to="/games" tabIndex={-1}>
             <button className='sidebar-button'><img src={PortalIcon} alt="games" /><span>Games</span></button>
           </Link>
 
-          <Link to="/leaderboards" tabIndex={-1}>
-            <button className='sidebar-button'><img src={FlagIcon} alt="leaderboards" /><span>Leaderboards</span></button>
+          <Link to="/rankings" tabIndex={-1}>
+            <button className='sidebar-button'><img src={FlagIcon} alt="rankings" /><span>Rankings</span></button>
           </Link>
 
-          <Link to="/scorelog" tabIndex={-1}>
+          {/* <Link to="/news" tabIndex={-1}>
+            <button className='sidebar-button'><img src={NewsIcon} alt="news" /><span>News</span></button>
+          </Link> */}
+
+          {/* <Link to="/scorelog" tabIndex={-1}>
             <button className='sidebar-button'><img src={TableIcon} alt="scorelogs" /><span>Score&nbsp;Logs</span></button>
-          </Link>
+          </Link> */}
         </div>
         <div id='sidebar-bottomlist'>
           <span></span>
-- 
cgit v1.2.3

