aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2025-08-15 18:10:19 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2025-08-15 18:10:19 +0300
commitf1798f570d645c5148908461064e402baadd2ed1 (patch)
tree9990b4c94a406d712b50f10e9d53dab63696f9f1 /frontend
parentchore: frontend package stuff (diff)
parentfeat/backend: add newrelic integration (#274) (diff)
downloadlphub-f1798f570d645c5148908461064e402baadd2ed1.tar.gz
lphub-f1798f570d645c5148908461064e402baadd2ed1.tar.bz2
lphub-f1798f570d645c5148908461064e402baadd2ed1.zip
feat/frontend: update tailwind to main branch
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/Summary.tsx25
-rw-r--r--frontend/src/types/Map.ts3
2 files changed, 14 insertions, 14 deletions
diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx
index 686652a..ba91f57 100644
--- a/frontend/src/components/Summary.tsx
+++ b/frontend/src/components/Summary.tsx
@@ -175,24 +175,23 @@ const Summary: React.FC<SummaryProps> = ({
175 <section id="section4" className="summary1"> 175 <section id="section4" className="summary1">
176 <div id="difficulty"> 176 <div id="difficulty">
177 <span className="">Difficulty</span> 177 <span className="">Difficulty</span>
178 {data.summary.routes[selectedRun].rating === 0 && <span className="text-foreground">N/A</span>} 178 {data.map.difficulty <= 2 && (
179 {data.summary.routes[selectedRun].rating === 1 && ( 179 <span style={{ color: "lime" }}>Very Easy</span>
180 <span style={{ color: "lime" }}>Very easy</span>
181 )} 180 )}
182 {data.summary.routes[selectedRun].rating === 2 && ( 181 {data.map.difficulty > 2 && data.map.difficulty <= 4 && (
183 <span style={{ color: "green" }}>Easy</span> 182 <span style={{ color: "green" }}>Easy</span>
184 )} 183 )}
185 {data.summary.routes[selectedRun].rating === 3 && ( 184 {data.map.difficulty > 4 && data.map.difficulty <= 6 && (
186 <span style={{ color: "yellow" }}>Medium</span> 185 <span style={{ color: "yellow" }}>Medium</span>
187 )} 186 )}
188 {data.summary.routes[selectedRun].rating === 4 && ( 187 {data.map.difficulty > 6 && data.map.difficulty <= 8 && (
189 <span style={{ color: "orange" }}>Hard</span> 188 <span style={{ color: "orange" }}>Hard</span>
190 )} 189 )}
191 {data.summary.routes[selectedRun].rating === 5 && ( 190 {data.map.difficulty > 8 && data.map.difficulty <= 10 && (
192 <span style={{ color: "red" }}>Very hard</span> 191 <span style={{ color: "red" }}>Very Hard</span>
193 )} 192 )}
194 <div> 193 <div>
195 {data.summary.routes[selectedRun].rating === 1 ? ( 194 {data.map.difficulty <= 2 && ? (
196 <div 195 <div
197 className="difficulty-rating" 196 className="difficulty-rating"
198 style={{ backgroundColor: "lime" }} 197 style={{ backgroundColor: "lime" }}
@@ -200,7 +199,7 @@ const Summary: React.FC<SummaryProps> = ({
200 ) : ( 199 ) : (
201 <div className="difficulty-rating"></div> 200 <div className="difficulty-rating"></div>
202 )} 201 )}
203 {data.summary.routes[selectedRun].rating === 2 ? ( 202 {data.map.difficulty > 2 && data.map.difficulty <= 4 && ? (
204 <div 203 <div
205 className="difficulty-rating" 204 className="difficulty-rating"
206 style={{ backgroundColor: "green" }} 205 style={{ backgroundColor: "green" }}
@@ -208,7 +207,7 @@ const Summary: React.FC<SummaryProps> = ({
208 ) : ( 207 ) : (
209 <div className="difficulty-rating"></div> 208 <div className="difficulty-rating"></div>
210 )} 209 )}
211 {data.summary.routes[selectedRun].rating === 3 ? ( 210 {data.map.difficulty > 4 && data.map.difficulty <= 6 && ? (
212 <div 211 <div
213 className="difficulty-rating" 212 className="difficulty-rating"
214 style={{ backgroundColor: "yellow" }} 213 style={{ backgroundColor: "yellow" }}
@@ -216,7 +215,7 @@ const Summary: React.FC<SummaryProps> = ({
216 ) : ( 215 ) : (
217 <div className="difficulty-rating"></div> 216 <div className="difficulty-rating"></div>
218 )} 217 )}
219 {data.summary.routes[selectedRun].rating === 4 ? ( 218 {data.map.difficulty > 6 && data.map.difficulty <= 8 && ? (
220 <div 219 <div
221 className="difficulty-rating" 220 className="difficulty-rating"
222 style={{ backgroundColor: "orange" }} 221 style={{ backgroundColor: "orange" }}
@@ -224,7 +223,7 @@ const Summary: React.FC<SummaryProps> = ({
224 ) : ( 223 ) : (
225 <div className="difficulty-rating"></div> 224 <div className="difficulty-rating"></div>
226 )} 225 )}
227 {data.summary.routes[selectedRun].rating === 5 ? ( 226 {data.map.difficulty > 8 && data.map.difficulty <= 10 && ? (
228 <div 227 <div
229 className="difficulty-rating" 228 className="difficulty-rating"
230 style={{ backgroundColor: "red" }} 229 style={{ backgroundColor: "red" }}
diff --git a/frontend/src/types/Map.ts b/frontend/src/types/Map.ts
index 6a42c2a..a5c9404 100644
--- a/frontend/src/types/Map.ts
+++ b/frontend/src/types/Map.ts
@@ -80,7 +80,8 @@ interface MapSummaryMap {
80 map_name: string; 80 map_name: string;
81 is_coop: boolean; 81 is_coop: boolean;
82 is_disabled: boolean; 82 is_disabled: boolean;
83} 83 difficulty: number;
84};
84 85
85interface MapSummaryDetails { 86interface MapSummaryDetails {
86 routes: MapSummaryDetailsRoute[]; 87 routes: MapSummaryDetailsRoute[];