1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-26 05:16:41 +07:00

getting token / error

This commit is contained in:
muerwre 2019-08-03 12:12:23 +07:00
parent 956802d5a5
commit dc6f72baf1
26 changed files with 269 additions and 374 deletions

19
src/redux/auth/reducer.ts Normal file
View file

@ -0,0 +1,19 @@
import {EMPTY_TOKEN, EMPTY_USER, AUTH_USER_ACTIONS} from "~/redux/auth/constants";
import { createReducer } from "~/utils/reducer";
import {IAuthState} from "~/redux/auth/types";
import {AUTH_USER_HANDLERS} from "~/redux/auth/handlers";
const HANDLERS = {
...AUTH_USER_HANDLERS,
};
const INITIAL_STATE: IAuthState = {
token: { ...EMPTY_TOKEN },
user: { ...EMPTY_USER },
login: {
error: null,
is_loading: false,
},
};
export default createReducer(INITIAL_STATE, HANDLERS);