Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
LiberaTeMetuMortis committed Dec 22, 2024
1 parent 3d71a51 commit cc64221
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/panels/database/DatabasePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[]) {
Expand Down
11 changes: 9 additions & 2 deletions src/components/panels/database/options/LocalOptionsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SegmentedControl,
Stack,
Text,
NativeSelect
NativeSelect,
} from "@mantine/core";
import { DateInput } from "@mantine/dates";
import { parseSquare } from "chessops";
Expand Down Expand Up @@ -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",
})
}
/>
</Group>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/repertoire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function openingReport({
fen: item.node.fen,
color: "white",
player: null,
result: "any"
result: "any",
},
"opening",
);
Expand Down

0 comments on commit cc64221

Please sign in to comment.