1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-11-26 22:50:57 +02:00
Files
focalboard/webapp/src/store/index.ts
Jesús Espino ee94e17f16 Add global templates to redux store (#731)
* Add global templates to redux store

* Removing unused import

* Remove unnecesary reducer

* Fixing eslint
2021-07-16 13:37:46 +02:00

29 lines
1.0 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {configureStore} from '@reduxjs/toolkit'
import {reducer as currentUserReducer} from './currentUser'
import {reducer as currentWorkspaceReducer} from './currentWorkspace'
import {reducer as currentWorkspaceUsersReducer} from './currentWorkspaceUsers'
import {reducer as languageReducer} from './language'
import {reducer as globalTemplatesReducer} from './globalTemplates'
const store = configureStore({
reducer: {
currentUser: currentUserReducer,
currentWorkspace: currentWorkspaceReducer,
currentWorkspaceUsers: currentWorkspaceUsersReducer,
language: languageReducer,
globalTemplates: globalTemplatesReducer,
},
})
export default store
// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>
// Inferred type: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch