From 69aeb7889ac136a8e4fbe7de1330298e30345479 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Wed, 22 Oct 2025 13:59:12 +0400 Subject: feat/frontend: switch to vite, update node to v22 (#281) --- frontend/src/components/Summary.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'frontend/src/components/Summary.tsx') diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx index 7da2f1e..72b5bf0 100644 --- a/frontend/src/components/Summary.tsx +++ b/frontend/src/components/Summary.tsx @@ -1,7 +1,7 @@ -import React from 'react'; -import ReactMarkdown from 'react-markdown'; +import React from "react"; +import ReactMarkdown from "react-markdown"; -import { MapSummary } from '@customTypes/Map'; +import { MapSummary } from "@customTypes/Map"; import "@css/Maps.css" interface SummaryProps { @@ -16,7 +16,7 @@ const Summary: React.FC = ({ selectedRun, setSelectedRun, data }) const [historySelected, setHistorySelected] = React.useState(false); function _select_run(idx: number, category_id: number) { - let r = document.querySelectorAll("button.record"); + const r = document.querySelectorAll("button.record"); r.forEach(e => (e as HTMLElement).style.backgroundColor = "#2b2e46"); (r[idx] as HTMLElement).style.backgroundColor = "#161723" @@ -66,7 +66,7 @@ const Summary: React.FC = ({ selectedRun, setSelectedRun, data }) style={data.map.image === "" ? { backgroundColor: "#202232" } : {}}>

{data.summary.routes[selectedRun].history.score_count} - {data.summary.routes[selectedRun].history.score_count === 1 ? ` portal` : ` portals`}

+ {data.summary.routes[selectedRun].history.score_count === 1 ? " portal" : " portals"}

{data.map.is_coop ? // TODO: make this part dynamic ( @@ -109,7 +109,7 @@ const Summary: React.FC = ({ selectedRun, setSelectedRun, data }) _select_run(index, r.category.id); }}> {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} {r.history.runner_name} -- cgit v1.2.3