diff options
| author | 2024-07-10 02:06:42 +0100 | |
|---|---|---|
| committer | 2024-07-10 02:06:42 +0100 | |
| commit | d96ea398a414595c907fde7c83027b6b1d42a0e3 (patch) | |
| tree | 48b287c399570a26bad5fc4ba566bcf2e1cb8356 /src/store.ts | |
| parent | Merge pull request #635 from python-discord/jb3/deps/dep-bumps (diff) | |
| parent | Add new test suite for testing authorization splash (diff) | |
Merge pull request #634 from python-discord/jb3/auth/popup-and-improvements
Authorization pop-up & misc improvements
Diffstat (limited to '')
| -rw-r--r-- | src/store.ts | 21 | 
1 files changed, 21 insertions, 0 deletions
diff --git a/src/store.ts b/src/store.ts new file mode 100644 index 0000000..1b9807b --- /dev/null +++ b/src/store.ts @@ -0,0 +1,21 @@ +import { combineReducers, configureStore } from "@reduxjs/toolkit"; + +import authorizationReducer from "./slices/authorization"; + +const rootReducer = combineReducers({ +    authorization: authorizationReducer +}); + +export const setupStore = (preloadedState?: Partial<RootState>) => { +    return configureStore({ +        reducer: rootReducer, +        preloadedState +    }); +}; + +const formsStore = setupStore(); + +export default formsStore; + +export type RootState = ReturnType<typeof rootReducer> +export type AppStore = ReturnType<typeof setupStore>  |