style : fix gap & margin & padding

This commit is contained in:
GuillaumeSD
2024-02-25 02:13:06 +01:00
parent 892004f0d0
commit 8d15b7e1a2
15 changed files with 104 additions and 119 deletions

View File

@@ -1,24 +1,19 @@
import {
boardAtom,
currentMoveAtom,
engineDepthAtom,
engineMultiPvAtom,
gameAtom,
gameEvalAtom,
} from "@/sections/analysis/states";
import { MoveEval } from "@/types/eval";
import { Move } from "chess.js";
import { useAtomValue } from "jotai";
import { useEffect, useState } from "react";
import { CurrentMove, MoveEval } from "@/types/eval";
import { useAtom, useAtomValue } from "jotai";
import { useEffect } from "react";
import { useEngine } from "./useEngine";
import { EngineName } from "@/types/enums";
export type CurrentMove = Partial<Move> & {
eval?: MoveEval;
lastEval?: MoveEval;
};
export const useCurrentMove = (engineName?: EngineName) => {
const [currentMove, setCurrentMove] = useState<CurrentMove>({});
const [currentMove, setCurrentMove] = useAtom(currentMoveAtom);
const engine = useEngine(engineName);
const gameEval = useAtomValue(gameEvalAtom);
const game = useAtomValue(gameAtom);