diff options
author | Ricardo Cino <ricardo@cino.io> | 2022-06-26 23:59:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-26 21:59:32 +0000 |
commit | 6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9 (patch) | |
tree | 1676f5eef42b8086d28476c7eaad62c7b1753120 /src/containers/auth/SignupScreen.tsx | |
parent | Reduce tab item layout shift (#376) (diff) | |
download | ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.tar.gz ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.tar.zst ferdium-app-6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9.zip |
chore: turned all auth containers into typescript (#375)
Diffstat (limited to 'src/containers/auth/SignupScreen.tsx')
-rw-r--r-- | src/containers/auth/SignupScreen.tsx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/containers/auth/SignupScreen.tsx b/src/containers/auth/SignupScreen.tsx new file mode 100644 index 000000000..1dac392ef --- /dev/null +++ b/src/containers/auth/SignupScreen.tsx | |||
@@ -0,0 +1,32 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | ||
3 | |||
4 | import { DefaultProps, GlobalError } from 'src/@types/ferdium-components.types'; | ||
5 | import Signup from '../../components/auth/Signup'; | ||
6 | |||
7 | interface SignUpScreenComponents extends DefaultProps { | ||
8 | error: GlobalError; | ||
9 | } | ||
10 | |||
11 | class SignupScreen extends Component<SignUpScreenComponents> { | ||
12 | onSignup(values: any): void { | ||
13 | const { actions } = this.props; | ||
14 | |||
15 | actions.user.signup(values); | ||
16 | } | ||
17 | |||
18 | render(): ReactElement { | ||
19 | const { stores, error } = this.props; | ||
20 | |||
21 | return ( | ||
22 | <Signup | ||
23 | onSubmit={values => this.onSignup(values)} | ||
24 | isSubmitting={stores.user.signupRequest.isExecuting} | ||
25 | loginRoute={stores.user.loginRoute} | ||
26 | error={error} | ||
27 | /> | ||
28 | ); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | export default inject('stores', 'actions')(observer(SignupScreen)); | ||