Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const actionEvent = (reduxMessage: string) => ({
- INIT: createAction(`[begin] ${reduxMessage}`),
- DONE: createAction(`[end] ${reduxMessage}`),
- FAIL: createAction(`[fail] ${reduxMessage}`),
- });
- export const AUTH = {
- SEND_CODE: actionEvent('send code'),
- SIGN_IN: actionEvent('sign in'),
- GET_PASSWORD: actionEvent('get password'),
- LOG_OUT: actionEvent('user log out'),
- };
- const error = createReducer<IAuthError>({
- [SEND_CODE.FAIL]: saveError, // A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
- [SIGN_IN.FAIL]: saveError,
- [GET_PASSWORD.FAIL]: saveError,
- }, {
- error_code: null,
- error_message: null,
- });
Add Comment
Please, Sign In to add comment