28 lines
478 B
TypeScript
Raw Normal View History

2024-12-11 17:26:36 +01: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