aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/pages/Maps.tsx
diff options
context:
space:
mode:
authorFifthWit <fifthwitbusiness@gmail.com>2025-01-30 13:11:48 -0600
committerFifthWit <fifthwitbusiness@gmail.com>2025-01-30 13:11:48 -0600
commit81342e2579165ebfdb28c749dc5225141721a419 (patch)
tree8e5759c20b92408048fe5ac44f48e2df2a00ab9b /frontend/src/pages/Maps.tsx
parentfixed issues with useCallback (diff)
downloadlphub-81342e2579165ebfdb28c749dc5225141721a419.tar.gz
lphub-81342e2579165ebfdb28c749dc5225141721a419.tar.bz2
lphub-81342e2579165ebfdb28c749dc5225141721a419.zip
switched to double quotes
Diffstat (limited to 'frontend/src/pages/Maps.tsx')
-rw-r--r--frontend/src/pages/Maps.tsx36
1 files changed, 18 insertions, 18 deletions
diff --git a/frontend/src/pages/Maps.tsx b/frontend/src/pages/Maps.tsx
index 33bd05b..fbdb8f3 100644
--- a/frontend/src/pages/Maps.tsx
+++ b/frontend/src/pages/Maps.tsx
@@ -1,15 +1,15 @@
1import React from 'react'; 1import React from "react";
2import { Link, useLocation } from 'react-router-dom'; 2import { Link, useLocation } from "react-router-dom";
3import { Helmet } from 'react-helmet'; 3import { Helmet } from "react-helmet";
4 4
5import { PortalIcon, FlagIcon, ChatIcon } from '@images/Images'; 5import { PortalIcon, FlagIcon, ChatIcon } from "@images/Images";
6import Summary from '@components/Summary'; 6import Summary from "@components/Summary";
7import Leaderboards from '@components/Leaderboards'; 7import Leaderboards from "@components/Leaderboards";
8import Discussions from '@components/Discussions'; 8import Discussions from "@components/Discussions";
9import ModMenu from '@components/ModMenu'; 9import ModMenu from "@components/ModMenu";
10import { MapDiscussions, MapLeaderboard, MapSummary } from '@customTypes/Map'; 10import { MapDiscussions, MapLeaderboard, MapSummary } from "@customTypes/Map";
11import { API } from '@api/Api'; 11import { API } from "@api/Api";
12import '@css/Maps.css'; 12import "@css/Maps.css";
13 13
14interface MapProps { 14interface MapProps {
15 token?: string; 15 token?: string;
@@ -33,7 +33,7 @@ const Maps: React.FC<MapProps> = ({ token, isModerator }) => {
33 33
34 const location = useLocation(); 34 const location = useLocation();
35 35
36 const mapID = location.pathname.split('/')[2]; 36 const mapID = location.pathname.split("/")[2];
37 37
38 const _fetch_map_summary = React.useCallback(async () => { 38 const _fetch_map_summary = React.useCallback(async () => {
39 const mapSummary = await API.get_map_summary(mapID); 39 const mapSummary = await API.get_map_summary(mapID);
@@ -41,7 +41,7 @@ const Maps: React.FC<MapProps> = ({ token, isModerator }) => {
41 }, [mapID]); 41 }, [mapID]);
42 42
43 const _fetch_map_leaderboards = React.useCallback(async () => { 43 const _fetch_map_leaderboards = React.useCallback(async () => {
44 const mapLeaderboards = await API.get_map_leaderboard(mapID, '1'); 44 const mapLeaderboards = await API.get_map_leaderboard(mapID, "1");
45 setMapLeaderboardData(mapLeaderboards); 45 setMapLeaderboardData(mapLeaderboards);
46 }, [mapID]); 46 }, [mapID]);
47 47
@@ -71,7 +71,7 @@ const Maps: React.FC<MapProps> = ({ token, isModerator }) => {
71 <Link to="/games"> 71 <Link to="/games">
72 <button 72 <button
73 className="nav-button" 73 className="nav-button"
74 style={{ borderRadius: '20px 20px 20px 20px' }} 74 style={{ borderRadius: "20px 20px 20px 20px" }}
75 > 75 >
76 <i className="triangle"></i> 76 <i className="triangle"></i>
77 <span>Games List</span> 77 <span>Games List</span>
@@ -125,18 +125,18 @@ const Maps: React.FC<MapProps> = ({ token, isModerator }) => {
125 <Link to="/games"> 125 <Link to="/games">
126 <button 126 <button
127 className="nav-button" 127 className="nav-button"
128 style={{ borderRadius: '20px 0px 0px 20px' }} 128 style={{ borderRadius: "20px 0px 0px 20px" }}
129 > 129 >
130 <i className="triangle"></i> 130 <i className="triangle"></i>
131 <span>Games List</span> 131 <span>Games List</span>
132 </button> 132 </button>
133 </Link> 133 </Link>
134 <Link 134 <Link
135 to={`/games/${mapSummaryData.map.is_coop ? '2' : '1'}?chapter=${mapSummaryData.map.chapter_name.split(' ')[1]}`} 135 to={`/games/${mapSummaryData.map.is_coop ? "2" : "1"}?chapter=${mapSummaryData.map.chapter_name.split(" ")[1]}`}
136 > 136 >
137 <button 137 <button
138 className="nav-button" 138 className="nav-button"
139 style={{ borderRadius: '0px 20px 20px 0px', marginLeft: '2px' }} 139 style={{ borderRadius: "0px 20px 20px 0px", marginLeft: "2px" }}
140 > 140 >
141 <i className="triangle"></i> 141 <i className="triangle"></i>
142 <span>{mapSummaryData.map.chapter_name}</span> 142 <span>{mapSummaryData.map.chapter_name}</span>