diff --git a/.vscode/settings.json b/.vscode/settings.json index af6434b62..56b68a9b2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,6 @@ { - "typescript.tsdk": "node_modules/typescript/lib" + "typescript.tsdk": "node_modules/typescript/lib", + "[typescriptreact]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + } } \ No newline at end of file diff --git a/client/src/components/tables/rivals/ComparePBsTable.tsx b/client/src/components/tables/rivals/ComparePBsTable.tsx index 63039838e..4c5721305 100644 --- a/client/src/components/tables/rivals/ComparePBsTable.tsx +++ b/client/src/components/tables/rivals/ComparePBsTable.tsx @@ -1,13 +1,7 @@ import { NumericSOV, StrSOV } from "util/sorts"; import { CreatePBCompareSearchParams } from "util/tables/create-search"; import React, { useEffect, useState } from "react"; -import { - Game, - GetGamePTConfig, - GetGPTString, - GetScoreMetricConf, - Playtype, -} from "tachi-common"; +import { Game, GetGamePTConfig, GetGPTString, GetScoreMetricConf, Playtype } from "tachi-common"; import { ComparePBsDataset } from "types/tables"; import { GPT_CLIENT_IMPLEMENTATIONS } from "lib/game-implementations"; import DifficultyCell from "../cells/DifficultyCell"; @@ -43,12 +37,7 @@ export default function ComparePBsTable({ const headers: Header[] = [ ChartHeader(game, (d) => d.chart), ["Song", "Song", StrSOV((x) => x.song.title)], - [ - "", - "", - () => 1, - () => {baseUser}, - ], + ["", "", () => 1, () => {baseUser}], [ "Vs.", "Vs.", @@ -96,12 +85,7 @@ export default function ComparePBsTable({ /> ), ], - [ - "", - "", - () => 1, - () => {compareUser}, - ], + ["", "", () => 1, () => {compareUser}], ]; return ( @@ -117,33 +101,16 @@ export default function ComparePBsTable({ ); } -function Row({ - data, - game, - metric, -}: { - data: ComparePBsDataset[0]; - game: Game; - metric: string; -}) { - const gptImpl = - GPT_CLIENT_IMPLEMENTATIONS[GetGPTString(game, data.chart.playtype)]; - const metricConf = GetScoreMetricConf( - GetGamePTConfig(game, data.chart.playtype), - metric, - )!; +function Row({ data, game, metric }: { data: ComparePBsDataset[0]; game: Game; metric: string }) { + const gptImpl = GPT_CLIENT_IMPLEMENTATIONS[GetGPTString(game, data.chart.playtype)]; + const metricConf = GetScoreMetricConf(GetGamePTConfig(game, data.chart.playtype), metric)!; return ( {data.base ? ( - + ) : ( Not Played )} @@ -156,12 +123,7 @@ function Row({ metric={metric} /> {data.compare ? ( - + ) : ( Not Played )}