aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/pages/Profile.tsx
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2025-10-26 13:51:31 +0400
committerGitHub <noreply@github.com>2025-10-26 12:51:31 +0300
commit6a631744d9c80ff9a1a9f4b278bc0337ecdb494e (patch)
tree3acf1f505751d997b1b7482823eacabcb79a03f3 /frontend/src/pages/Profile.tsx
parentfix/frontend: tablet view logout button (#286) (diff)
downloadlphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.tar.gz
lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.tar.bz2
lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.zip
chore/frontend: semicolon linting (#287)
Diffstat (limited to 'frontend/src/pages/Profile.tsx')
-rw-r--r--frontend/src/pages/Profile.tsx22
1 files changed, 11 insertions, 11 deletions
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx
index e7b8325..8b8ce3e 100644
--- a/frontend/src/pages/Profile.tsx
+++ b/frontend/src/pages/Profile.tsx
@@ -28,8 +28,8 @@ const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRec
28 const [pageNumber, setPageNumber] = React.useState(1); 28 const [pageNumber, setPageNumber] = React.useState(1);
29 const [pageMax, setPageMax] = React.useState(0); 29 const [pageMax, setPageMax] = React.useState(0);
30 30
31 const [game, setGame] = React.useState("0") 31 const [game, setGame] = React.useState("0");
32 const [chapter, setChapter] = React.useState("0") 32 const [chapter, setChapter] = React.useState("0");
33 const [chapterData, setChapterData] = React.useState<GameChapters | null>(null); 33 const [chapterData, setChapterData] = React.useState<GameChapters | null>(null);
34 const [maps, setMaps] = React.useState<Map[]>([]); 34 const [maps, setMaps] = React.useState<Map[]>([]);
35 35
@@ -100,7 +100,7 @@ const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRec
100 if (profile && game !== "0") { 100 if (profile && game !== "0") {
101 _get_game_maps(); 101 _get_game_maps();
102 } 102 }
103 }, [profile, game, chapter, chapterData]) 103 }, [profile, game, chapter, chapterData]);
104 104
105 if (!profile) { 105 if (!profile) {
106 return ( 106 return (
@@ -279,14 +279,14 @@ const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRec
279 <span>{e.date.split("T")[0]}</span> 279 <span>{e.date.split("T")[0]}</span>
280 <span style={{ flexDirection: "row-reverse" }}> 280 <span style={{ flexDirection: "row-reverse" }}>
281 281
282 <button style={{ marginRight: "10px" }} onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button> 282 <button style={{ marginRight: "10px" }} onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`); }}><img src={ThreedotIcon} alt="demo_id" /></button>
283 <button onClick={() => { _delete_submission(r.map_id, e.record_id) }}><img src={DeleteIcon}></img></button> 283 <button onClick={() => { _delete_submission(r.map_id, e.record_id); }}><img src={DeleteIcon}></img></button>
284 <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button> 284 <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button>
285 {i === 0 && r.scores.length > 1 ? <button onClick={() => { 285 {i === 0 && r.scores.length > 1 ? <button onClick={() => {
286 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" || 286 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" ||
287 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ? 287 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ?
288 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${r.scores.length * 46}px` : 288 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${r.scores.length * 46}px` :
289 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px" 289 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px";
290 } 290 }
291 }><img src={HistoryIcon} alt="history" /></button> : ""} 291 }><img src={HistoryIcon} alt="history" /></button> : ""}
292 292
@@ -325,14 +325,14 @@ const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRec
325 <span>{record!.scores[i].date.split("T")[0]}</span> 325 <span>{record!.scores[i].date.split("T")[0]}</span>
326 <span style={{ flexDirection: "row-reverse" }}> 326 <span style={{ flexDirection: "row-reverse" }}>
327 327
328 <button onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button> 328 <button onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`); }}><img src={ThreedotIcon} alt="demo_id" /></button>
329 <button onClick={() => { _delete_submission(r.id, e.record_id) }}><img src={DeleteIcon}></img></button> 329 <button onClick={() => { _delete_submission(r.id, e.record_id); }}><img src={DeleteIcon}></img></button>
330 <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button> 330 <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button>
331 {i === 0 && record!.scores.length > 1 ? <button onClick={() => { 331 {i === 0 && record!.scores.length > 1 ? <button onClick={() => {
332 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" || 332 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" ||
333 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ? 333 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ?
334 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${record!.scores.length * 46}px` : 334 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${record!.scores.length * 46}px` :
335 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px" 335 (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px";
336 } 336 }
337 }><img src={HistoryIcon} alt="history" /></button> : ""} 337 }><img src={HistoryIcon} alt="history" /></button> : ""}
338 338
@@ -340,8 +340,8 @@ const Profile: React.FC<ProfileProps> = ({ profile, token, gameData, onDeleteRec
340 </>))} 340 </>))}
341 </button> 341 </button>
342 342
343 ) 343 );
344 } else { return null } 344 } else { return null; }
345 }) : (<>{console.warn(maps)}</>)} 345 }) : (<>{console.warn(maps)}</>)}
346 </div> 346 </div>
347 </section> 347 </section>