inital commit

This commit is contained in:
2023-10-12 23:45:46 +03:00
parent 9b16b14a4c
commit 6bcc0fd3cc
86 changed files with 13784 additions and 34 deletions

16
src/redux/store.ts Normal file
View File

@@ -0,0 +1,16 @@
import {configureStore} from '@reduxjs/toolkit';
import authReducer, {pokemonApi} from 'features/auth/authSlice';
import {useDispatch} from "react-redux";
export const store = configureStore({
reducer: {
auth: authReducer,
[pokemonApi.reducerPath]: pokemonApi.reducer
},
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(pokemonApi.middleware)
});
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
export const useAppDispatch = () => useDispatch<AppDispatch>();