blob: bf7ffe7787f7711fcb7e86607e9f9e2f1f11894d (
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
33
34
35
|
import { Component, ReactElement } from 'react';
import { inject, observer } from 'mobx-react';
import {
StoresProps,
GlobalError,
} from '../../@types/ferdium-components.types';
import Signup from '../../components/auth/Signup';
interface SignUpScreenComponents extends StoresProps {
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));
|