Structure de données jeu client
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
import { createSlice } from '@reduxjs/toolkit'
|
||||
|
||||
export interface ChallengeAction {
|
||||
id: number
|
||||
challengeId: number
|
||||
title: string,
|
||||
description: string,
|
||||
reward: number,
|
||||
success: boolean,
|
||||
start: Date,
|
||||
end: Date | null,
|
||||
penaltyStart: Date | null,
|
||||
penaltyEnd: Date | null,
|
||||
}
|
||||
|
||||
export interface ActionsState {
|
||||
challengeActions: ChallengeAction[]
|
||||
}
|
||||
|
||||
const initialState: ActionsState = {
|
||||
challengeActions: []
|
||||
}
|
||||
|
||||
export const challengeActionsSlice = createSlice({
|
||||
name: 'challengeActions',
|
||||
initialState: initialState,
|
||||
reducers: {
|
||||
},
|
||||
})
|
||||
|
||||
export const { } = challengeActionsSlice.actions
|
||||
|
||||
export default challengeActionsSlice.reducer
|
Reference in New Issue
Block a user