traintrape-moi/client/utils/features/challenges/challengesSlice.ts

28 lines
478 B
TypeScript
Raw Normal View History

2024-12-11 16:26:36 +00:00
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