aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/Sidebar.tsx20
-rw-r--r--frontend/src/components/Summary.tsx4
2 files changed, 12 insertions, 12 deletions
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx
index c45ec27..0a7efa8 100644
--- a/frontend/src/components/Sidebar.tsx
+++ b/frontend/src/components/Sidebar.tsx
@@ -60,7 +60,7 @@ const Sidebar: React.FC<SidebarProps> = ({ setToken, profile, setProfile, onUplo
60 setSidebarOpen(false); 60 setSidebarOpen(false);
61 side.style.width = "320px" 61 side.style.width = "320px"
62 btn.forEach((e, i) => { 62 btn.forEach((e, i) => {
63 e.style.width = "310px" 63 e.style.width = (window.innerWidth > 1024) ? "310px" : "265px"
64 e.style.padding = "0.4em 0 0 11px" 64 e.style.padding = "0.4em 0 0 11px"
65 setTimeout(() => { 65 setTimeout(() => {
66 span[i].style.opacity = "1" 66 span[i].style.opacity = "1"
@@ -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>
diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx
index 72b5bf0..922960b 100644
--- a/frontend/src/components/Summary.tsx
+++ b/frontend/src/components/Summary.tsx
@@ -140,11 +140,11 @@ const Summary: React.FC<SummaryProps> = ({ selectedRun, setSelectedRun, data })
140 <section id='section4' className='summary1'> 140 <section id='section4' className='summary1'>
141 <div id='difficulty'> 141 <div id='difficulty'>
142 <span>Difficulty</span> 142 <span>Difficulty</span>
143 {data.map.difficulty <= 2 && (<span style={{ color: "lime" }}>Very easy</span>)} 143 {data.map.difficulty <= 2 && (<span style={{ color: "lime" }}>Very Easy</span>)}
144 {data.map.difficulty > 2 && data.map.difficulty <= 4 && (<span style={{ color: "green" }}>Easy</span>)} 144 {data.map.difficulty > 2 && data.map.difficulty <= 4 && (<span style={{ color: "green" }}>Easy</span>)}
145 {data.map.difficulty > 4 && data.map.difficulty <= 6 && (<span style={{ color: "yellow" }}>Medium</span>)} 145 {data.map.difficulty > 4 && data.map.difficulty <= 6 && (<span style={{ color: "yellow" }}>Medium</span>)}
146 {data.map.difficulty > 6 && data.map.difficulty <= 8 && (<span style={{ color: "orange" }}>Hard</span>)} 146 {data.map.difficulty > 6 && data.map.difficulty <= 8 && (<span style={{ color: "orange" }}>Hard</span>)}
147 {data.map.difficulty > 8 && data.map.difficulty <= 10 && (<span style={{ color: "red" }}>Very hard</span>)} 147 {data.map.difficulty > 8 && data.map.difficulty <= 10 && (<span style={{ color: "red" }}>Very Hard</span>)}
148 <div> 148 <div>
149 {data.map.difficulty <= 2 ? (<div className='difficulty-rating' style={{ backgroundColor: "lime" }}></div>) : (<div className='difficulty-rating'></div>)} 149 {data.map.difficulty <= 2 ? (<div className='difficulty-rating' style={{ backgroundColor: "lime" }}></div>) : (<div className='difficulty-rating'></div>)}
150 {data.map.difficulty > 2 && data.map.difficulty <= 4 ? (<div className='difficulty-rating' style={{ backgroundColor: "green" }}></div>) : (<div className='difficulty-rating'></div>)} 150 {data.map.difficulty > 2 && data.map.difficulty <= 4 ? (<div className='difficulty-rating' style={{ backgroundColor: "green" }}></div>) : (<div className='difficulty-rating'></div>)}