From 81342e2579165ebfdb28c749dc5225141721a419 Mon Sep 17 00:00:00 2001 From: FifthWit Date: Thu, 30 Jan 2025 13:11:48 -0600 Subject: switched to double quotes --- frontend/src/components/Summary.tsx | 68 ++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'frontend/src/components/Summary.tsx') diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx index 9f39506..61e52d4 100644 --- a/frontend/src/components/Summary.tsx +++ b/frontend/src/components/Summary.tsx @@ -1,8 +1,8 @@ -import React from 'react'; -import ReactMarkdown from 'react-markdown'; +import React from "react"; +import ReactMarkdown from "react-markdown"; -import { MapSummary } from '@customTypes/Map'; -import '@css/Maps.css'; +import { MapSummary } from "@customTypes/Map"; +import "@css/Maps.css"; interface SummaryProps { selectedRun: number; @@ -20,9 +20,9 @@ const Summary: React.FC = ({ const _select_run = React.useCallback( (idx: number, category_id: number) => { - let r = document.querySelectorAll('button.record'); - r.forEach(e => ((e as HTMLElement).style.backgroundColor = '#2b2e46')); - (r[idx] as HTMLElement).style.backgroundColor = '#161723'; + let r = document.querySelectorAll("button.record"); + r.forEach(e => ((e as HTMLElement).style.backgroundColor = "#2b2e46")); + (r[idx] as HTMLElement).style.backgroundColor = "#161723"; if (data && data.summary.routes.length !== 0) { idx += data.summary.routes.filter( @@ -42,9 +42,9 @@ const Summary: React.FC = ({ } const _category_change = React.useCallback(() => { - const btn = document.querySelectorAll('#section3 #category span button'); + const btn = document.querySelectorAll("#section3 #category span button"); btn.forEach(e => { - (e as HTMLElement).style.backgroundColor = '#2b2e46'; + (e as HTMLElement).style.backgroundColor = "#2b2e46"; }); // heavenly father forgive me for i have sinned. TODO: fix this bullshit with dynamic categories const idx = @@ -53,18 +53,18 @@ const Summary: React.FC = ({ : data.map.is_coop ? selectedCategory - 3 : selectedCategory - 1; - (btn[idx] as HTMLElement).style.backgroundColor = '#202232'; + (btn[idx] as HTMLElement).style.backgroundColor = "#202232"; }, [selectedCategory, data.map.is_coop]); const _history_change = React.useCallback(() => { - const btn = document.querySelectorAll('#section3 #history span button'); + const btn = document.querySelectorAll("#section3 #history span button"); btn.forEach(e => { - (e as HTMLElement).style.backgroundColor = '#2b2e46'; + (e as HTMLElement).style.backgroundColor = "#2b2e46"; }); (historySelected ? (btn[1] as HTMLElement) : (btn[0] as HTMLElement) - ).style.backgroundColor = '#202232'; + ).style.backgroundColor = "#202232"; }, [historySelected]); React.useEffect(() => { @@ -85,7 +85,7 @@ const Summary: React.FC = ({

@@ -97,7 +97,7 @@ const Summary: React.FC = ({ : ` portals`}

{data.map.is_coop ? ( // TODO: make this part dynamic - + ) : ( - +
-
+
{data.summary.routes.filter(e => e.category.id === selectedCategory) .length === 0 ? (
There are no records for this map.
@@ -142,8 +142,8 @@ const Summary: React.FC = ({ > {new Date(r.history.date).toLocaleDateString( - 'en-US', - { month: 'long', day: 'numeric', year: 'numeric' } + "en-US", + { month: "long", day: "numeric", year: "numeric" } )} {r.history.score_count} @@ -155,7 +155,7 @@ const Summary: React.FC = ({ )}
-
+
{data.summary.routes.filter(e => e.category.id === selectedCategory) .length === 0 ? (
There are no records for this map.
@@ -178,25 +178,25 @@ const Summary: React.FC = ({ Difficulty {data.summary.routes[selectedRun].rating === 0 && N/A} {data.summary.routes[selectedRun].rating === 1 && ( - Very easy + Very easy )} {data.summary.routes[selectedRun].rating === 2 && ( - Easy + Easy )} {data.summary.routes[selectedRun].rating === 3 && ( - Medium + Medium )} {data.summary.routes[selectedRun].rating === 4 && ( - Hard + Hard )} {data.summary.routes[selectedRun].rating === 5 && ( - Very hard + Very hard )}
{data.summary.routes[selectedRun].rating === 1 ? (
) : (
@@ -204,7 +204,7 @@ const Summary: React.FC = ({ {data.summary.routes[selectedRun].rating === 2 ? (
) : (
@@ -212,7 +212,7 @@ const Summary: React.FC = ({ {data.summary.routes[selectedRun].rating === 3 ? (
) : (
@@ -220,7 +220,7 @@ const Summary: React.FC = ({ {data.summary.routes[selectedRun].rating === 4 ? (
) : (
@@ -228,7 +228,7 @@ const Summary: React.FC = ({ {data.summary.routes[selectedRun].rating === 5 ? (
) : (
@@ -243,18 +243,18 @@ const Summary: React.FC = ({
- {data.summary.routes[selectedRun].showcase !== '' ? ( + {data.summary.routes[selectedRun].showcase !== "" ? ( ) : ( - '' + "" )}

Route Description

-- cgit v1.2.3