diff options
| author | Max Nanis | 2026-09-13 19:03:55 +0000 |
|---|---|---|
| committer | Max Nanis | 2026-09-13 19:03:55 +0000 |
| commit | 8fbe8d439b418796932aaa88297e006c714e4d13 (patch) | |
| tree | 6c800476edc1e771fc570b559d483df8d59d4324 /jb-ui/src/store.ts | |
| parent | 12f6fee851b68e86af658dfa17e4a0daed457dd1 (diff) | |
| parent | 2c94f248d2438071a918fa9a30bf114ef9aa29b4 (diff) | |
| download | amt-jb-8fbe8d439b418796932aaa88297e006c714e4d13.tar.gz amt-jb-8fbe8d439b418796932aaa88297e006c714e4d13.zip | |
Merges pull request #3
Off of Amazon!!!
Diffstat (limited to 'jb-ui/src/store.ts')
| -rw-r--r-- | jb-ui/src/store.ts | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/jb-ui/src/store.ts b/jb-ui/src/store.ts index 7b4d3e3..081de9f 100644 --- a/jb-ui/src/store.ts +++ b/jb-ui/src/store.ts @@ -1,32 +1,38 @@ -import appReducers from "@/models/appSlice" -import grlStatsReducers from "@/models/grlStatsSlice" -import grlEventsReducers from "@/models/grlEventsSlice" -import profilingQuestionsReducers from "@/models/profilingQuestionsSlice" -import type { Action, ThunkAction } from '@reduxjs/toolkit' -import { configureStore } from '@reduxjs/toolkit' +import appReducers from "@/models/appSlice"; +import grlStatsReducers from "@/models/grlStatsSlice"; +import grlEventsReducers from "@/models/grlEventsSlice"; +import { authApi } from "@/models/authAPI"; +import profilingQuestionsReducers from "@/models/profilingQuestionsSlice"; +import cashoutMethodReducers from "@/models/cashoutMethodsSlice"; +import type { Action, ThunkAction } from "@reduxjs/toolkit"; +import { configureStore } from "@reduxjs/toolkit"; export const store = configureStore({ - reducer: { - app: appReducers, - stats: grlStatsReducers, - events: grlEventsReducers, - profilingQuestions: profilingQuestionsReducers, - } -}) + reducer: { + app: appReducers, + // auth: authReducers, + [authApi.reducerPath]: authApi.reducer, + stats: grlStatsReducers, + events: grlEventsReducers, + profilingQuestions: profilingQuestionsReducers, + cashoutMethods: cashoutMethodReducers, + }, + middleware: (getDefault) => getDefault().concat(authApi.middleware), +}); // Infer the type of `store` -export type AppStore = typeof store +export type AppStore = typeof store; // Infer the `AppDispatch` type from the store itself -export type AppDispatch = typeof store.dispatch +export type AppDispatch = typeof store.dispatch; // Same for the `RootState` type -export type RootState = ReturnType<typeof store.getState> +export type RootState = ReturnType<typeof store.getState>; // Define a reusable type describing thunk functions export type AppThunk<ThunkReturnType = void> = ThunkAction< - ThunkReturnType, - RootState, - unknown, - Action -> + ThunkReturnType, + RootState, + unknown, + Action +>; |
