mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
redux: setMode sagas
This commit is contained in:
parent
dde6cf83e9
commit
0d47cd8773
6 changed files with 127 additions and 51 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue