diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2025-10-26 13:51:31 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-26 12:51:31 +0300 |
| commit | 6a631744d9c80ff9a1a9f4b278bc0337ecdb494e (patch) | |
| tree | 3acf1f505751d997b1b7482823eacabcb79a03f3 /frontend/src/pages/User.tsx | |
| parent | fix/frontend: tablet view logout button (#286) (diff) | |
| download | lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.tar.gz lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.tar.bz2 lphub-6a631744d9c80ff9a1a9f4b278bc0337ecdb494e.zip | |
chore/frontend: semicolon linting (#287)
Diffstat (limited to 'frontend/src/pages/User.tsx')
| -rw-r--r-- | frontend/src/pages/User.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/frontend/src/pages/User.tsx b/frontend/src/pages/User.tsx index 33be1f0..236d5f9 100644 --- a/frontend/src/pages/User.tsx +++ b/frontend/src/pages/User.tsx | |||
| @@ -83,7 +83,7 @@ const User: React.FC<UserProps> = ({ token, profile, gameData }) => { | |||
| 83 | if (user && game !== "0") { | 83 | if (user && game !== "0") { |
| 84 | _get_game_maps(); | 84 | _get_game_maps(); |
| 85 | } | 85 | } |
| 86 | }, [user, game, chapter, location]) | 86 | }, [user, game, chapter, location]); |
| 87 | 87 | ||
| 88 | if (!user) { | 88 | if (!user) { |
| 89 | return ( | 89 | return ( |
| @@ -248,13 +248,13 @@ const User: React.FC<UserProps> = ({ token, profile, gameData }) => { | |||
| 248 | <span>{e.date.split("T")[0]}</span> | 248 | <span>{e.date.split("T")[0]}</span> |
| 249 | <span style={{ flexDirection: "row-reverse" }}> | 249 | <span style={{ flexDirection: "row-reverse" }}> |
| 250 | 250 | ||
| 251 | <button onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button> | 251 | <button onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`); }}><img src={ThreedotIcon} alt="demo_id" /></button> |
| 252 | <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button> | 252 | <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button> |
| 253 | {i === 0 && r.scores.length > 1 ? <button onClick={() => { | 253 | {i === 0 && r.scores.length > 1 ? <button onClick={() => { |
| 254 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" || | 254 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" || |
| 255 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ? | 255 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ? |
| 256 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${r.scores.length * 46}px` : | 256 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${r.scores.length * 46}px` : |
| 257 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px" | 257 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px"; |
| 258 | } | 258 | } |
| 259 | }><img src={HistoryIcon} alt="history" /></button> : ""} | 259 | }><img src={HistoryIcon} alt="history" /></button> : ""} |
| 260 | 260 | ||
| @@ -293,13 +293,13 @@ const User: React.FC<UserProps> = ({ token, profile, gameData }) => { | |||
| 293 | <span>{record!.scores[i].date.split("T")[0]}</span> | 293 | <span>{record!.scores[i].date.split("T")[0]}</span> |
| 294 | <span style={{ flexDirection: "row-reverse" }}> | 294 | <span style={{ flexDirection: "row-reverse" }}> |
| 295 | 295 | ||
| 296 | <button onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`) }}><img src={ThreedotIcon} alt="demo_id" /></button> | 296 | <button onClick={() => { message("Demo Information", `Demo ID: ${e.demo_id}`); }}><img src={ThreedotIcon} alt="demo_id" /></button> |
| 297 | <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button> | 297 | <button onClick={() => window.location.href = `/api/v1/demos?uuid=${e.demo_id}`}><img src={DownloadIcon} alt="download" /></button> |
| 298 | {i === 0 && record!.scores.length > 1 ? <button onClick={() => { | 298 | {i === 0 && record!.scores.length > 1 ? <button onClick={() => { |
| 299 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" || | 299 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "44px" || |
| 300 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ? | 300 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height === "" ? |
| 301 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${record!.scores.length * 46}px` : | 301 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = `${record!.scores.length * 46}px` : |
| 302 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px" | 302 | (document.querySelectorAll(".profileboard-record")[index % 20] as HTMLInputElement).style.height = "44px"; |
| 303 | } | 303 | } |
| 304 | }><img src={HistoryIcon} alt="history" /></button> : ""} | 304 | }><img src={HistoryIcon} alt="history" /></button> : ""} |
| 305 | 305 | ||
| @@ -307,8 +307,8 @@ const User: React.FC<UserProps> = ({ token, profile, gameData }) => { | |||
| 307 | </>))} | 307 | </>))} |
| 308 | </button> | 308 | </button> |
| 309 | 309 | ||
| 310 | ) | 310 | ); |
| 311 | } else { return null } | 311 | } else { return null; } |
| 312 | }) : (<>{console.warn(maps)}</>)} | 312 | }) : (<>{console.warn(maps)}</>)} |
| 313 | </div> | 313 | </div> |
| 314 | </section> | 314 | </section> |