redux: setMode sagas

This commit is contained in:
muerwre 2018-11-26 13:33:18 +07:00
parent dde6cf83e9
commit 0d47cd8773
6 changed files with 127 additions and 51 deletions

View file

@ -2,6 +2,7 @@ import { createReducer } from 'reduxsauce';
import { ACTIONS } from '$redux/user/constants';
import { DEFAULT_USER } from '$constants/auth';
import { MODES } from '$constants/modes';
import { DEFAULT_LOGO } from '$constants/logos';
const setUser = (state, { user }) => ({
...state,
@ -26,7 +27,14 @@ export const INITIAL_STATE = {
user: { ...DEFAULT_USER },
editing: false,
mode: MODES.NONE,
logo: DEFAULT_LOGO,
routerPoints: 0,
distance: 0,
estimateTime: 0,
activeSticker: null,
title: 0,
address: '',
changed: false,
};
export const userReducer = createReducer(INITIAL_STATE, HANDLERS);