feat : add GA
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
engineMultiPvAtom,
|
||||
gameAtom,
|
||||
gameEvalAtom,
|
||||
} from "../states";
|
||||
} from "./states";
|
||||
import { useAtomValue, useSetAtom } from "jotai";
|
||||
import { getFens } from "@/lib/chess";
|
||||
import { useGameDatabase } from "@/hooks/useGameDatabase";
|
||||
@@ -14,6 +14,7 @@ import { LoadingButton } from "@mui/lab";
|
||||
import Slider from "@/components/slider";
|
||||
import { useEngine } from "@/hooks/useEngine";
|
||||
import { EngineName } from "@/types/enums";
|
||||
import { logAnalyticsEvent } from "@/lib/firebase";
|
||||
|
||||
export default function AnalyzePanel() {
|
||||
const engine = useEngine(EngineName.Stockfish16);
|
||||
@@ -47,6 +48,13 @@ export default function AnalyzePanel() {
|
||||
if (gameFromUrl) {
|
||||
setGameEval(gameFromUrl.id, newGameEval);
|
||||
}
|
||||
|
||||
logAnalyticsEvent("analyze_game", {
|
||||
engine: EngineName.Stockfish16,
|
||||
depth: engineDepth,
|
||||
multiPv: engineMultiPv,
|
||||
nbPositions: 1,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
gameEvalAtom,
|
||||
showBestMoveArrowAtom,
|
||||
showPlayerMoveArrowAtom,
|
||||
} from "../states";
|
||||
} from "./states";
|
||||
|
||||
export default function ArrowOptions() {
|
||||
const gameEval = useAtomValue(gameEvalAtom);
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Icon } from "@iconify/react";
|
||||
import { Grid, List, Typography } from "@mui/material";
|
||||
import { useAtomValue } from "jotai";
|
||||
import { boardAtom, engineMultiPvAtom, gameAtom } from "./states";
|
||||
import { boardAtom, engineMultiPvAtom, gameAtom } from "../states";
|
||||
import LineEvaluation from "./lineEvaluation";
|
||||
import { useCurrentMove } from "@/hooks/useCurrentMove";
|
||||
import { LineEval } from "@/types/eval";
|
||||
@@ -1,7 +1,7 @@
|
||||
import { LineEval } from "@/types/eval";
|
||||
import { ListItem, Skeleton, Typography } from "@mui/material";
|
||||
import { useAtomValue } from "jotai";
|
||||
import { boardAtom } from "./states";
|
||||
import { boardAtom } from "../states";
|
||||
import { moveLineUciToSan } from "@/lib/chess";
|
||||
|
||||
interface Props {
|
||||
Reference in New Issue
Block a user