blob: 1dac392ef933a164f06df4b9af1b31df36429575 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import { Component, ReactElement } from 'react';
import { inject, observer } from 'mobx-react';
import { DefaultProps, GlobalError } from 'src/@types/ferdium-components.types';
import Signup from '../../components/auth/Signup';
interface SignUpScreenComponents extends DefaultProps {
error: GlobalError;
}
class SignupScreen extends Component<SignUpScreenComponents> {
onSignup(values: any): void {
const { actions } = this.props;
actions.user.signup(values);
}
render(): ReactElement {
const { stores, error } = this.props;
return (
<Signup
onSubmit={values => this.onSignup(values)}
isSubmitting={stores.user.signupRequest.isExecuting}
loginRoute={stores.user.loginRoute}
error={error}
/>
);
}
}
export default inject('stores', 'actions')(observer(SignupScreen));
|