traintrape-moi/client/utils/features/challengeActions/challengeActionsSlice.ts

34 lines
697 B
TypeScript
Raw Normal View History

2024-12-11 16:26:36 +00:00
import { createSlice } from '@reduxjs/toolkit'
export interface ChallengeAction {
id: number
challengeId: number
title: string,
description: string,
reward: number,
success: boolean,
start: number, // date
end: number | null, // date
penaltyStart: number | null, // date
penaltyEnd: number | null, // date
2024-12-11 16:26:36 +00:00
}
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