From 6a631744d9c80ff9a1a9f4b278bc0337ecdb494e Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sun, 26 Oct 2025 13:51:31 +0400 Subject: chore/frontend: semicolon linting (#287) --- frontend/src/pages/Games.tsx | 4 ++-- frontend/src/pages/Maplist.tsx | 14 +++++++------- frontend/src/pages/Profile.tsx | 22 +++++++++++----------- frontend/src/pages/Rankings.tsx | 34 +++++++++++++++++----------------- frontend/src/pages/User.tsx | 14 +++++++------- 5 files changed, 44 insertions(+), 44 deletions(-) (limited to 'frontend/src/pages') diff --git a/frontend/src/pages/Games.tsx b/frontend/src/pages/Games.tsx index 909ea20..f4b5463 100644 --- a/frontend/src/pages/Games.tsx +++ b/frontend/src/pages/Games.tsx @@ -3,7 +3,7 @@ import { Helmet } from "react-helmet"; import GameEntry from "@components/GameEntry"; import { Game } from "@customTypes/Game"; -import "@css/Maps.css" +import "@css/Maps.css"; interface GamesProps { games: Game[]; @@ -16,7 +16,7 @@ const Games: React.FC = ({ games }) => { loaders.forEach((loader) => { (loader as HTMLElement).style.display = "none"; }); - } + }; React.useEffect(() => { document.querySelectorAll(".games-page-item-body").forEach((game, index) => { diff --git a/frontend/src/pages/Maplist.tsx b/frontend/src/pages/Maplist.tsx index bda24cd..dc655ca 100644 --- a/frontend/src/pages/Maplist.tsx +++ b/frontend/src/pages/Maplist.tsx @@ -34,7 +34,7 @@ const Maplist: React.FC = () => { const _fetch_chapters = async (chapter_id: string) => { const chapters = await API.get_chapters(chapter_id); setCurChapter(chapters); - } + }; const _handle_dropdown_click = () => { if (dropdownActive == "none") { @@ -42,7 +42,7 @@ const Maplist: React.FC = () => { } else { setDropdownActive("none"); } - } + }; // im sorry but im too lazy to fix this right now useEffect(() => { @@ -73,7 +73,7 @@ const Maplist: React.FC = () => { const games_chapters = await API.get_games_chapters(gameId.toString()); setGameChapters(games_chapters); setNumChapters(games_chapters.chapters.length); - } + }; setLoad(true); _fetch_game(); @@ -85,7 +85,7 @@ const Maplist: React.FC = () => { if (gameChapters != undefined && !queryParams.get("chapter")) { _fetch_chapters(gameChapters!.chapters[0].id.toString()); } - }, [gameChapters]) + }, [gameChapters]); @@ -124,7 +124,7 @@ const Maplist: React.FC = () => {
{game?.category_portals.map((cat, index) => ( - ))} @@ -143,7 +143,7 @@ const Maplist: React.FC = () => {
{gameChapters?.chapters.map((chapter, i) => { - return
{ _fetch_chapters(chapter.id.toString()); _handle_dropdown_click() }}>{chapter.name}
+ return
{ _fetch_chapters(chapter.id.toString()); _handle_dropdown_click(); }}>{chapter.name}
; }) } @@ -173,7 +173,7 @@ const Maplist: React.FC = () => {
- + ; })} 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 = ({ profile, token, gameData, onDeleteRec const [pageNumber, setPageNumber] = React.useState(1); const [pageMax, setPageMax] = React.useState(0); - const [game, setGame] = React.useState("0") - const [chapter, setChapter] = React.useState("0") + const [game, setGame] = React.useState("0"); + const [chapter, setChapter] = React.useState("0"); const [chapterData, setChapterData] = React.useState(null); const [maps, setMaps] = React.useState([]); @@ -100,7 +100,7 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec if (profile && game !== "0") { _get_game_maps(); } - }, [profile, game, chapter, chapterData]) + }, [profile, game, chapter, chapterData]); if (!profile) { return ( @@ -279,14 +279,14 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec {e.date.split("T")[0]} - - + + {i === 0 && r.scores.length > 1 ? : ""} @@ -325,14 +325,14 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec {record!.scores[i].date.split("T")[0]} - - + + {i === 0 && record!.scores.length > 1 ? : ""} @@ -340,8 +340,8 @@ const Profile: React.FC = ({ profile, token, gameData, onDeleteRec ))} - ) - } else { return null } + ); + } else { return null; } }) : (<>{console.warn(maps)})} diff --git a/frontend/src/pages/Rankings.tsx b/frontend/src/pages/Rankings.tsx index 4a96e26..4693117 100644 --- a/frontend/src/pages/Rankings.tsx +++ b/frontend/src/pages/Rankings.tsx @@ -31,15 +31,15 @@ const Rankings: React.FC = () => { const rankings = await API.get_official_rankings(); setLeaderboardData(rankings); if (currentLeaderboardType == RankingCategories.rankings_singleplayer) { - setCurrentLeaderboard(rankings.rankings_singleplayer) + setCurrentLeaderboard(rankings.rankings_singleplayer); } else if (currentLeaderboardType == RankingCategories.rankings_multiplayer) { - setCurrentLeaderboard(rankings.rankings_multiplayer) + setCurrentLeaderboard(rankings.rankings_multiplayer); } else { - setCurrentLeaderboard(rankings.rankings_overall) + setCurrentLeaderboard(rankings.rankings_overall); } setLoad(true); setLeaderboardLoad(true); - } + }; const __dev_fetch_unofficial_rankings = async () => { try { @@ -47,17 +47,17 @@ const Rankings: React.FC = () => { const rankings = await API.get_unofficial_rankings(); setLeaderboardData(rankings); if (currentLeaderboardType == RankingCategories.rankings_singleplayer) { - setCurrentLeaderboard(rankings.rankings_singleplayer) + setCurrentLeaderboard(rankings.rankings_singleplayer); } else if (currentLeaderboardType == RankingCategories.rankings_multiplayer) { - setCurrentLeaderboard(rankings.rankings_multiplayer) + setCurrentLeaderboard(rankings.rankings_multiplayer); } else { - setCurrentLeaderboard(rankings.rankings_overall) + setCurrentLeaderboard(rankings.rankings_overall); } setLeaderboardLoad(true); } catch (e) { - console.log(e) + console.log(e); } - } + }; const _set_current_leaderboard = (ranking_cat: RankingCategories) => { if (ranking_cat == RankingCategories.rankings_singleplayer) { @@ -69,7 +69,7 @@ const Rankings: React.FC = () => { } setCurrentLeaderboardType(ranking_cat); - } + }; const _set_leaderboard_type = (leaderboard_type: LeaderboardTypes) => { if (leaderboard_type == LeaderboardTypes.official) { @@ -77,14 +77,14 @@ const Rankings: React.FC = () => { } else { } - } + }; useEffect(() => { _fetch_rankings(); if (load) { _set_current_leaderboard(RankingCategories.rankings_singleplayer); } - }, [load]) + }, [load]); return (
@@ -93,10 +93,10 @@ const Rankings: React.FC = () => {
- -
@@ -127,7 +127,7 @@ const Rankings: React.FC = () => {
{leaderboardLoad && currentLeaderboard?.map((curRankingData, i) => { - return + return ; }) } @@ -140,7 +140,7 @@ const Rankings: React.FC = () => {
: null}
- ) -} + ); +}; export default Rankings; 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 = ({ token, profile, gameData }) => { if (user && game !== "0") { _get_game_maps(); } - }, [user, game, chapter, location]) + }, [user, game, chapter, location]); if (!user) { return ( @@ -248,13 +248,13 @@ const User: React.FC = ({ token, profile, gameData }) => { {e.date.split("T")[0]} - + {i === 0 && r.scores.length > 1 ? : ""} @@ -293,13 +293,13 @@ const User: React.FC = ({ token, profile, gameData }) => { {record!.scores[i].date.split("T")[0]} - + {i === 0 && record!.scores.length > 1 ? : ""} @@ -307,8 +307,8 @@ const User: React.FC = ({ token, profile, gameData }) => { ))} - ) - } else { return null } + ); + } else { return null; } }) : (<>{console.warn(maps)})} -- cgit v1.2.3