Structure de données jeu client
This commit is contained in:
27
client/utils/features/challenges/challengesSlice.ts
Normal file
27
client/utils/features/challenges/challengesSlice.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { createSlice } from '@reduxjs/toolkit'
|
||||
|
||||
export interface Challenge {
|
||||
id: number
|
||||
title: string,
|
||||
description: string,
|
||||
reward: number,
|
||||
}
|
||||
|
||||
export interface ChallengesState {
|
||||
challenges: Challenge[]
|
||||
}
|
||||
|
||||
const initialState: ChallengesState = {
|
||||
challenges: []
|
||||
}
|
||||
|
||||
export const challengesSlice = createSlice({
|
||||
name: 'challenges',
|
||||
initialState: initialState,
|
||||
reducers: {
|
||||
},
|
||||
})
|
||||
|
||||
export const { } = challengesSlice.actions
|
||||
|
||||
export default challengesSlice.reducer
|
Reference in New Issue
Block a user