feat : add board interactions

This commit is contained in:
GuillaumeSD
2024-02-23 04:01:18 +01:00
parent 2af0959e82
commit 814d3ecf09
19 changed files with 458 additions and 107 deletions

View File

@@ -55,9 +55,11 @@ export const useGameDatabase = (shouldFetchGames?: boolean) => {
if (!db) throw new Error("Database not initialized");
const gameToAdd = formatGameToDatabase(game);
await db.add("games", gameToAdd as Game);
const gameId = await db.add("games", gameToAdd as Game);
loadGames();
return gameId;
};
const setGameEval = async (gameId: number, evaluation: GameEval) => {