This commit is contained in:
crusader 2017-07-03 13:00:00 +09:00
parent 2056461b7d
commit c7a8f0aa3b
9 changed files with 16 additions and 17 deletions

View File

View File

@ -13,3 +13,15 @@ abstract class Service {
}
export default Service;
export function dService(...methodNames: string[]): Function {
return function(owner: any, methodName?: string): void {
if (!owner.prototype) {
handleActionReducer(owner, methodName);
return;
}
handleRootReducer(owner, methodNames);
}
}

View File

@ -11,6 +11,7 @@ export class MemberService extends Service {
this.send('signin');
return null;
}
public signout(member: Member): Member {
return null;

View File

@ -22,7 +22,7 @@ const apiSignin = (signinId: string, signinPw: string): Promise<Member> => {
});
};
function* signin(action: Action<SigninPayload>): Iterable<Effect> {
function* signin(action: Action<SigninPayload>): SagaIterator {
try {
const {signinId, signinPw} = action.payload;
// yield put({
@ -46,6 +46,6 @@ function* signin(action: Action<SigninPayload>): Iterable<Effect> {
}
}
export function* watchSignin(): Iterable<SagaIterator> {
yield takeLatest(actionTypes.REQUEST, signin);
export function* watchSignin(): SagaIterator {
yield takeLatest(SigninActions.REQUEST, signin);
}

View File

View File

@ -1,14 +0,0 @@
import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import SigninContainer from './containers/Signin';
class Signin extends React.Component<RouteComponentProps<object>, object> {
public render(): JSX.Element {
return (
<SigninContainer/>
);
}
}
export default Signin;