traintrape-moi/client/utils/store.ts

25 lines
911 B
TypeScript
Raw Permalink Normal View History

import { configureStore } from '@reduxjs/toolkit'
2024-12-11 16:26:36 +00:00
import authReducer from './features/auth/authSlice'
import challengesReducer from './features/challenges/challengesSlice'
import challengeActionsReducer from './features/challengeActions/challengeActionsSlice'
import gameReducer from './features/game/gameSlice'
import locationReducer from './features/location/locationSlice'
import moneyUpdatesReducer from './features/moneyUpdates/moneyUpdatesSlice'
2024-12-11 16:26:36 +00:00
import trainReducer from './features/train/trainSlice'
const store = configureStore({
reducer: {
auth: authReducer,
2024-12-11 16:26:36 +00:00
challenges: challengesReducer,
challengeActions: challengeActionsReducer,
game: gameReducer,
location: locationReducer,
moneyUpdates: moneyUpdatesReducer,
2024-12-11 16:26:36 +00:00
train: trainReducer,
},
})
export default store
export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch