From 907be9cbc0941cefcf2c7e52840bbf9ebf779d0d Mon Sep 17 00:00:00 2001 From: djmil Date: Tue, 14 Nov 2023 12:04:16 +0100 Subject: [PATCH] newGame create: newgame fist in a gamelist --- webapp/src/api/games.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/api/games.js b/webapp/src/api/games.js index a6d907c..aa099c4 100644 --- a/webapp/src/api/games.js +++ b/webapp/src/api/games.js @@ -22,7 +22,7 @@ export default function useGamesApi(gamesReducer, config) { pushNewGame: (reqParams) => doPushing('/api/gameproposal', 'POST', reqParams, { onPushing: (isPushingNewGame) => dispatchGames({ type: 'next', isPushingNewGame }), - onSuccess: (game) => dispatchGames({ type: 'next', gamesList: [...games.gamesList, game], newGame: emptyNewGame }) + onSuccess: (game) => dispatchGames({ type: 'next', gamesList: [game, ...games.gamesList], newGame: emptyNewGame }) }), } }