Pénalité lorsqu'on échoue un défi
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { useAppDispatch, useAppSelector } from "./useStore"
|
||||
import { GamePayload, setPlayerId, updateActiveChallengeId, updateGameState, updateMoney } from "@/utils/features/game/gameSlice"
|
||||
import { GamePayload, PenaltyPayload, setPlayerId, updateActiveChallengeId, updateGameState, updateMoney, updatePenalty } from "@/utils/features/game/gameSlice"
|
||||
|
||||
export const useGame = () => useAppSelector((state) => state.game)
|
||||
export const useSetPlayerId = () => {
|
||||
@ -18,3 +18,7 @@ export const useUpdateGameState = () => {
|
||||
const dispatch = useAppDispatch()
|
||||
return (game: GamePayload) => dispatch(updateGameState(game))
|
||||
}
|
||||
export const useUpdatePenalty = () => {
|
||||
const dispatch = useAppDispatch()
|
||||
return (penalty: PenaltyPayload) => dispatch(updatePenalty(penalty))
|
||||
}
|
||||
|
Reference in New Issue
Block a user