|
@@ -3,14 +3,14 @@ import thunk from "redux-thunk";
|
|
|
|
|
|
import { promiseReducer, localStoredReducer, totalReducer, authReducer } from "./reducers";
|
|
import { promiseReducer, localStoredReducer, totalReducer, authReducer } from "./reducers";
|
|
|
|
|
|
-import { actionPending, actionFulfilled, actionRejected, actionPromise } from "./action";
|
|
|
|
|
|
+import { actionPending, actionFulfilled, actionRejected, actionPromise, actionFullLogin, actionLogin } from "./action";
|
|
|
|
|
|
// объект со всеми редьюсерами
|
|
// объект со всеми редьюсерами
|
|
-const reducers = {
|
|
|
|
- promise: localStoredReducer(promiseReducer, 'promise'),
|
|
|
|
- auth: localStoredReducer(authReducer, 'auth'),
|
|
|
|
- // cart: localStoredReducer(cartReducer, 'cart'),
|
|
|
|
-}
|
|
|
|
|
|
+// const reducers = {
|
|
|
|
+// promise: localStoredReducer(promiseReducer, 'promise'),
|
|
|
|
+// auth: localStoredReducer(authReducer, 'auth'),
|
|
|
|
+// // cart: localStoredReducer(cartReducer, 'cart'),
|
|
|
|
+// }
|
|
|
|
|
|
// const totalReducer = combineRedusers(reducers)
|
|
// const totalReducer = combineRedusers(reducers)
|
|
|
|
|
|
@@ -20,4 +20,7 @@ const reducers = {
|
|
|
|
|
|
// 2 изменение
|
|
// 2 изменение
|
|
export const store = createStore(totalReducer, applyMiddleware(thunk))
|
|
export const store = createStore(totalReducer, applyMiddleware(thunk))
|
|
-store.subscribe(() => console.log(store.getState()))
|
|
|
|
|
|
+store.subscribe(() => console.log(store.getState()))
|
|
|
|
+
|
|
|
|
+// запрос на логинизацию
|
|
|
|
+store.dispatch(actionFullLogin('volddemar4ik', 'Qwerty1324'))
|