refactor: store folder for redux
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import type { CreateClientConfig } from './client/client.gen';
|
import type { CreateClientConfig } from "@/lib/client/client.gen";
|
||||||
|
|
||||||
export const createClientConfig: CreateClientConfig = (config) => ({
|
export const createClientConfig: CreateClientConfig = config => ({
|
||||||
...config,
|
...config,
|
||||||
baseUrl: 'http://crm.logidex.ru/api',
|
baseUrl: "http://crm.logidex.ru/api",
|
||||||
});
|
});
|
||||||
@ -1,5 +1,5 @@
|
|||||||
import { combineReducers } from "@reduxjs/toolkit";
|
import { combineReducers } from "@reduxjs/toolkit";
|
||||||
import authReducer from "@/lib/features/auth/authSlice";
|
import authReducer from "@/lib/store/features/auth/authSlice";
|
||||||
|
|
||||||
const rootReducer = combineReducers({
|
const rootReducer = combineReducers({
|
||||||
auth: authReducer,
|
auth: authReducer,
|
||||||
@ -2,7 +2,7 @@ import { configureStore } from "@reduxjs/toolkit";
|
|||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { persistReducer, persistStore } from "redux-persist";
|
import { persistReducer, persistStore } from "redux-persist";
|
||||||
import storage from "redux-persist/lib/storage";
|
import storage from "redux-persist/lib/storage";
|
||||||
import rootReducer from "@/lib/features/rootReducer";
|
import rootReducer from "@/lib/store/features/rootReducer";
|
||||||
|
|
||||||
const persistConfig = {
|
const persistConfig = {
|
||||||
key: "root",
|
key: "root",
|
||||||
@ -3,7 +3,7 @@
|
|||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
import { Provider } from "react-redux";
|
import { Provider } from "react-redux";
|
||||||
import { PersistGate } from "redux-persist/integration/react";
|
import { PersistGate } from "redux-persist/integration/react";
|
||||||
import { persistor, store } from "@/lib/store";
|
import { persistor, store } from "@/lib/store/store";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
|
|||||||
Reference in New Issue
Block a user