diff options
author | Michael Hunteman <michael@huntm.net> | 2024-05-17 15:20:30 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-05-17 15:20:30 -0700 |
commit | 7103019890960e793deefb64987a09b33be60b42 (patch) | |
tree | c1c9402aa250c68b2cbe13d62598232bbf20b1e2 /client/src/store.ts | |
parent | fc5c111bcfe296bec82e1cf9fdb88fc80fb24f89 (diff) |
Add golang server
Diffstat (limited to 'client/src/store.ts')
-rw-r--r-- | client/src/store.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/client/src/store.ts b/client/src/store.ts new file mode 100644 index 0000000..264639e --- /dev/null +++ b/client/src/store.ts @@ -0,0 +1,16 @@ +import { configureStore } from '@reduxjs/toolkit'; +import { apiSlice } from './apiSlice'; +import authReducer from './features/auth/authSlice'; + +const store = configureStore({ + reducer: { + [apiSlice.reducerPath]: apiSlice.reducer, + auth: authReducer, + }, + middleware: (getDefaultMiddleware) => + getDefaultMiddleware().concat(apiSlice.middleware), +}); + +export default store; +export type RootState = ReturnType<typeof store.getState>; +export type AppDispatch = typeof store.dispatch; |