aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Sidebar.tsx
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-09-04 11:57:44 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-09-04 11:57:44 +0300
commit2303fe299098c445754943e0a4f2ef7630e22bf5 (patch)
treed773d32ede3ee04fef90a7a6251e1fa96f5a9986 /frontend/src/components/Sidebar.tsx
parent[#189 + #193] Games page fix (diff)
downloadlphub-2303fe299098c445754943e0a4f2ef7630e22bf5.tar.gz
lphub-2303fe299098c445754943e0a4f2ef7630e22bf5.tar.bz2
lphub-2303fe299098c445754943e0a4f2ef7630e22bf5.zip
refactor: update sidebar for core pages, small fix in modmenu
Diffstat (limited to 'frontend/src/components/Sidebar.tsx')
-rw-r--r--frontend/src/components/Sidebar.tsx30
1 files changed, 15 insertions, 15 deletions
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 }) => {
90 90
91 React.useEffect(() => { 91 React.useEffect(() => {
92 if (path === "/") { handle_sidebar_click(1) } 92 if (path === "/") { handle_sidebar_click(1) }
93 else if (path.includes("news")) { handle_sidebar_click(2) } 93 else if (path.includes("games")) { handle_sidebar_click(2) }
94 else if (path.includes("games")) { handle_sidebar_click(3) } 94 else if (path.includes("rankings")) { handle_sidebar_click(3) }
95 else if (path.includes("leaderboards")) { handle_sidebar_click(4) } 95 // else if (path.includes("news")) { handle_sidebar_click(4) }
96 else if (path.includes("scorelog")) { handle_sidebar_click(5) } 96 // else if (path.includes("scorelog")) { handle_sidebar_click(5) }
97 else if (path.includes("profile")) { handle_sidebar_click(6) } 97 else if (path.includes("profile")) { handle_sidebar_click(4) }
98 else if (path.includes("rules")) { handle_sidebar_click(8) } 98 else if (path.includes("rules")) { handle_sidebar_click(5) }
99 else if (path.includes("about")) { handle_sidebar_click(9) } 99 else if (path.includes("about")) { handle_sidebar_click(6) }
100 }, [path]); 100 }, [path]);
101 101
102 return ( 102 return (
@@ -121,21 +121,21 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile }) => {
121 <button className='sidebar-button'><img src={HomeIcon} alt="homepage" /><span>Home&nbsp;Page</span></button> 121 <button className='sidebar-button'><img src={HomeIcon} alt="homepage" /><span>Home&nbsp;Page</span></button>
122 </Link> 122 </Link>
123 123
124 <Link to="/news" tabIndex={-1}>
125 <button className='sidebar-button'><img src={NewsIcon} alt="news" /><span>News</span></button>
126 </Link>
127
128 <Link to="/games" tabIndex={-1}> 124 <Link to="/games" tabIndex={-1}>
129 <button className='sidebar-button'><img src={PortalIcon} alt="games" /><span>Games</span></button> 125 <button className='sidebar-button'><img src={PortalIcon} alt="games" /><span>Games</span></button>
130 </Link> 126 </Link>
131 127
132 <Link to="/leaderboards" tabIndex={-1}> 128 <Link to="/rankings" tabIndex={-1}>
133 <button className='sidebar-button'><img src={FlagIcon} alt="leaderboards" /><span>Leaderboards</span></button> 129 <button className='sidebar-button'><img src={FlagIcon} alt="rankings" /><span>Rankings</span></button>
134 </Link> 130 </Link>
135 131
136 <Link to="/scorelog" tabIndex={-1}> 132 {/* <Link to="/news" tabIndex={-1}>
133 <button className='sidebar-button'><img src={NewsIcon} alt="news" /><span>News</span></button>
134 </Link> */}
135
136 {/* <Link to="/scorelog" tabIndex={-1}>
137 <button className='sidebar-button'><img src={TableIcon} alt="scorelogs" /><span>Score&nbsp;Logs</span></button> 137 <button className='sidebar-button'><img src={TableIcon} alt="scorelogs" /><span>Score&nbsp;Logs</span></button>
138 </Link> 138 </Link> */}
139 </div> 139 </div>
140 <div id='sidebar-bottomlist'> 140 <div id='sidebar-bottomlist'>
141 <span></span> 141 <span></span>