ing
This commit is contained in:
parent
d3c2449694
commit
6bd41d7355
|
@ -1,22 +1,10 @@
|
|||
import Action from '@overflow/commons/redux/Action';
|
||||
import { ReducersMapObject } from 'redux';
|
||||
import createReducer from '@overflow/commons/redux/createReducer';
|
||||
import Member from '@overflow/member/api/model/Member';
|
||||
|
||||
import * as SigninActionTypes from '../action/signIn';
|
||||
import SigninState, { defaultState as signinDefaultState } from '../state/SignIn';
|
||||
|
||||
// export type reducer = (state: SigninState, action: Action<Member | Error>) => SigninState;
|
||||
|
||||
// export const reducer: reducer = createReducer(signinDefaultState, {
|
||||
// [SigninActionTypes.REQUEST_SUCCESS]: (state: SigninState = signinDefaultState, action: Action<Member>): SigninState => {
|
||||
// return state;
|
||||
// },
|
||||
// [SigninActionTypes.REQUEST_FAILURE]: (state: SigninState = signinDefaultState, action: Action<Error>): SigninState => {
|
||||
// return state;
|
||||
// },
|
||||
// });
|
||||
|
||||
const reducer: ReducersMapObject = {
|
||||
[SigninActionTypes.REQUEST_SUCCESS]: (state: SigninState = signinDefaultState, action: Action<Member>): SigninState => {
|
||||
return state;
|
||||
|
@ -27,25 +15,3 @@ const reducer: ReducersMapObject = {
|
|||
};
|
||||
|
||||
export default reducer;
|
||||
|
||||
// export const reducer: reducer = (state: SigninState = signinDefaultState, action: Action<Member | Error>): SigninState => {
|
||||
// switch (action.type) {
|
||||
// case SigninActionTypes.REQUEST_SUCCESS:
|
||||
// {
|
||||
// let member = (<Action<Member>>action).payload;
|
||||
|
||||
// const aaa: SigninState = {
|
||||
// ...state,
|
||||
// isAuthenticated: true,
|
||||
// };
|
||||
|
||||
// return aaa;
|
||||
// }
|
||||
// case SigninActionTypes.REQUEST_FAILURE:
|
||||
// {
|
||||
// return state;
|
||||
// }
|
||||
// default:
|
||||
// return state;
|
||||
// }
|
||||
// };
|
||||
|
|
Loading…
Reference in New Issue
Block a user