aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Sidebar
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2025-10-28 21:59:35 +0400
committerGitHub <noreply@github.com>2025-10-28 20:59:35 +0300
commita9a1423d425dbb551229b07bd3704435570b202a (patch)
tree9bc9d572ed21bc619479f1f2ddb16beda25c9827 /frontend/src/components/Sidebar
parentfeat/frontend: add dates to recent scores in homepage (#296) (diff)
downloadlphub-main.tar.gz
lphub-main.tar.bz2
lphub-main.zip
fix/frontend: sidebar shadow drop (#297)HEADv1.0.7main
Diffstat (limited to '')
-rw-r--r--frontend/src/components/Sidebar.tsx26
1 files changed, 13 insertions, 13 deletions
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx
index 8e2573c..f19f9c0 100644
--- a/frontend/src/components/Sidebar.tsx
+++ b/frontend/src/components/Sidebar.tsx
@@ -51,7 +51,7 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile, onUplo
51 const login = document.querySelectorAll(".login>button")[1] as HTMLElement; 51 const login = document.querySelectorAll(".login>button")[1] as HTMLElement;
52 login.style.opacity = "1"; 52 login.style.opacity = "1";
53 uploadRunBtn.style.width = "310px"; 53 uploadRunBtn.style.width = "310px";
54 uploadRunBtn.style.padding = "0.4em 0 0 11px"; 54 uploadRunBtn.style.padding = "0 0 0 11px";
55 uploadRunSpan.style.opacity = "0"; 55 uploadRunSpan.style.opacity = "0";
56 setTimeout(() => { 56 setTimeout(() => {
57 uploadRunSpan.style.opacity = "1"; 57 uploadRunSpan.style.opacity = "1";
@@ -61,7 +61,7 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile, onUplo
61 side.style.width = "320px"; 61 side.style.width = "320px";
62 btn.forEach((e, i) => { 62 btn.forEach((e, i) => {
63 e.style.width = (window.innerWidth > 1024) ? "310px" : "265px"; 63 e.style.width = (window.innerWidth > 1024) ? "310px" : "265px";
64 e.style.padding = "0.4em 0 0 11px"; 64 e.style.padding = "0 0 0 11px";
65 setTimeout(() => { 65 setTimeout(() => {
66 span[i].style.opacity = "1"; 66 span[i].style.opacity = "1";
67 }, 100); 67 }, 100);
@@ -72,7 +72,7 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile, onUplo
72 const login = document.querySelectorAll(".login>button")[1] as HTMLElement; 72 const login = document.querySelectorAll(".login>button")[1] as HTMLElement;
73 login.style.opacity = "0"; 73 login.style.opacity = "0";
74 uploadRunBtn.style.width = "40px"; 74 uploadRunBtn.style.width = "40px";
75 uploadRunBtn.style.padding = "0.4em 0 0 5px"; 75 uploadRunBtn.style.padding = "0 0 0 5px";
76 uploadRunSpan.style.opacity = "0"; 76 uploadRunSpan.style.opacity = "0";
77 } 77 }
78 setSidebarOpen(true); 78 setSidebarOpen(true);
@@ -80,7 +80,7 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile, onUplo
80 searchbar.focus(); 80 searchbar.focus();
81 btn.forEach((e, i) => { 81 btn.forEach((e, i) => {
82 e.style.width = "40px"; 82 e.style.width = "40px";
83 e.style.padding = "0.4em 0 0 5px"; 83 e.style.padding = "0 0 0 5px";
84 span[i].style.opacity = "0"; 84 span[i].style.opacity = "0";
85 }); 85 });
86 setTimeout(() => { 86 setTimeout(() => {
@@ -225,15 +225,15 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile, onUplo
225 </Link> 225 </Link>
226 ))} 226 ))}
227 {searchData?.players.map((q, index) => 227 {searchData?.players.map((q, index) =>
228 ( 228 (
229 <Link to={ 229 <Link to={
230 profile && q.steam_id === profile.steam_id ? "/profile" : 230 profile && q.steam_id === profile.steam_id ? "/profile" :
231 `/users/${q.steam_id}` 231 `/users/${q.steam_id}`
232 } className='search-player' key={index} onClick={_close_mobile_search_and_menu}> 232 } className='search-player' key={index} onClick={_close_mobile_search_and_menu}>
233 <img src={q.avatar_link} alt='pfp'></img> 233 <img src={q.avatar_link} alt='pfp'></img>
234 <span style={{ fontSize: `${36 - q.user_name.length * 0.8}px` }}>{q.user_name}</span> 234 <span style={{ fontSize: `${36 - q.user_name.length * 0.8}px` }}>{q.user_name}</span>
235 </Link> 235 </Link>
236 ))} 236 ))}
237 237
238 </div> 238 </div>
239 </div> 239 </div>