diff --git a/src/components/panels/database/DatabasePanel.tsx b/src/components/panels/database/DatabasePanel.tsx index daf7bb6f..e9a493ef 100644 --- a/src/components/panels/database/DatabasePanel.tsx +++ b/src/components/panels/database/DatabasePanel.tsx @@ -56,7 +56,7 @@ export type LocalOptions = { color: "white" | "black"; start_date?: string; end_date?: string; - result: "any" | "whitewon" | "draw" | "blackwon", + result: "any" | "whitewon" | "draw" | "blackwon"; }; function sortOpenings(openings: Opening[]) { diff --git a/src/components/panels/database/options/LocalOptionsPanel.tsx b/src/components/panels/database/options/LocalOptionsPanel.tsx index c9a1d01d..b0ae2848 100644 --- a/src/components/panels/database/options/LocalOptionsPanel.tsx +++ b/src/components/panels/database/options/LocalOptionsPanel.tsx @@ -9,7 +9,7 @@ import { SegmentedControl, Stack, Text, - NativeSelect + NativeSelect, } from "@mantine/core"; import { DateInput } from "@mantine/dates"; import { parseSquare } from "chessops"; @@ -69,7 +69,14 @@ function LocalOptionsPanel({ boardFen }: { boardFen: string }) { ]} value={options.result} onChange={(v) => - setOptions({ ...options, result: v.currentTarget.value as "any" | "whitewon" | "draw" | "blackwon" }) + setOptions({ + ...options, + result: v.currentTarget.value as + | "any" + | "whitewon" + | "draw" + | "blackwon", + }) } /> diff --git a/src/utils/db.ts b/src/utils/db.ts index 2fa7194e..0ffad92b 100644 --- a/src/utils/db.ts +++ b/src/utils/db.ts @@ -191,7 +191,7 @@ export async function searchPosition(options: LocalOptions, tab: string) { }, start_date: options.start_date, end_date: options.end_date, - wanted_result: options.result + wanted_result: options.result, }, tab, ); diff --git a/src/utils/repertoire.ts b/src/utils/repertoire.ts index b59d1bcd..df24b459 100644 --- a/src/utils/repertoire.ts +++ b/src/utils/repertoire.ts @@ -74,7 +74,7 @@ export async function openingReport({ fen: item.node.fen, color: "white", player: null, - result: "any" + result: "any", }, "opening", );