diff --git a/src/ts/@overflow/app/views/member/EmailConfirm.tsx b/src/ts/@overflow/app/views/member/EmailConfirm.tsx deleted file mode 100644 index 880a21c..0000000 --- a/src/ts/@overflow/app/views/member/EmailConfirm.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from 'react'; -import { RouteComponentProps } from 'react-router'; -import PWChangeContainer from '@overflow/member/react/PWChange'; - -export interface Props { -} -export interface State { -} - -class EmailConfirm extends React.Component, State> { - public constructor(props?: RouteComponentProps, context?: State) { - super(props, context); - - } - - public render(): JSX.Element { - return ( - - ); - } -} - - -export default EmailConfirm; diff --git a/src/ts/@overflow/app/views/member/ForgotPassword.tsx b/src/ts/@overflow/app/views/member/ForgotPassword.tsx index 6f898d9..51664fc 100644 --- a/src/ts/@overflow/app/views/member/ForgotPassword.tsx +++ b/src/ts/@overflow/app/views/member/ForgotPassword.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { RouteComponentProps } from 'react-router'; -import PWChangeContainer from '@overflow/member/react/PWChange'; +import ForgotPasswordContainer from '@overflow/member/react/ForgotPassword'; export interface Props { } @@ -15,7 +15,7 @@ class ForgotPassword extends React.Component, State> public render(): JSX.Element { return ( - + ); } } diff --git a/src/ts/@overflow/member/react/PWChange.tsx b/src/ts/@overflow/member/react/ForgotPassword.tsx similarity index 82% rename from src/ts/@overflow/member/react/PWChange.tsx rename to src/ts/@overflow/member/react/ForgotPassword.tsx index 980e7f1..b9bf447 100644 --- a/src/ts/@overflow/member/react/PWChange.tsx +++ b/src/ts/@overflow/member/react/ForgotPassword.tsx @@ -3,7 +3,7 @@ import { PWChange, StateProps as PWCangeStateProps, DispatchProps as PWCangeDispatchProps, -} from './components/PWChange'; +} from './components/ForgotPassword'; import * as pwChangeActions from '../redux/action/pw_change'; @@ -17,8 +17,8 @@ export function mapStateToProps(state: any): PWCangeStateProps { export function mapDispatchToProps(dispatch: Dispatch): PWCangeDispatchProps { return { - onResetPassword: (pass: string) => { - dispatch(asyncRequestActions.request('MemberService', 'forgotPassword', pwChangeActions.REQUEST, 'overflow@loafle.com', pass)); + onForgotPassword: (email: string) => { + dispatch(asyncRequestActions.request('MemberService', 'forgotPassword', pwChangeActions.REQUEST, email)); // dispatch(pwChangeActions.request(pass)); }, }; diff --git a/src/ts/@overflow/member/react/components/PWChange.tsx b/src/ts/@overflow/member/react/components/ForgotPassword.tsx similarity index 55% rename from src/ts/@overflow/member/react/components/PWChange.tsx rename to src/ts/@overflow/member/react/components/ForgotPassword.tsx index 659b318..84687cd 100644 --- a/src/ts/@overflow/member/react/components/PWChange.tsx +++ b/src/ts/@overflow/member/react/components/ForgotPassword.tsx @@ -11,14 +11,13 @@ export interface StateProps { } export interface DispatchProps { - onResetPassword?(pass:string):void; + onForgotPassword?(pass:string):void; } export type Props = StateProps & DispatchProps; export interface State { - pass: string; - passCon: string; + email: string; } export class PWChange extends React.Component { @@ -26,8 +25,7 @@ export class PWChange extends React.Component { super(props, context); this.state = { - pass:null, - passCon:null, + email:null, }; } @@ -35,24 +33,20 @@ export class PWChange extends React.Component { public render(): JSX.Element { return (
- , data: InputOnChangeData) => { - this.setState({ pass: data.value }); - }} /> - , data: InputOnChangeData) => { - this.setState({ passCon: data.value }); + this.setState({ email: data.value }); }} /> - + ); } - private passChangeClick(event: React.SyntheticEvent, data: ButtonProps):void { - this.props.onResetPassword(this.state.pass); + private forgotPwClick(event: React.SyntheticEvent, data: ButtonProps):void { + this.props.onForgotPassword(this.state.pass); } }