diff options
author | 2022-06-26 23:59:32 +0200 | |
---|---|---|
committer | 2022-06-26 21:59:32 +0000 | |
commit | 6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9 (patch) | |
tree | 1676f5eef42b8086d28476c7eaad62c7b1753120 /src/containers/auth/LoginScreen.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/LoginScreen.tsx')
-rw-r--r-- | src/containers/auth/LoginScreen.tsx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/containers/auth/LoginScreen.tsx b/src/containers/auth/LoginScreen.tsx new file mode 100644 index 000000000..4c5271fe1 --- /dev/null +++ b/src/containers/auth/LoginScreen.tsx | |||
@@ -0,0 +1,29 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import { DefaultProps, GlobalError } from 'src/@types/ferdium-components.types'; | ||
4 | import Login from '../../components/auth/Login'; | ||
5 | |||
6 | interface LoginScreenProps extends DefaultProps { | ||
7 | error: GlobalError; | ||
8 | } | ||
9 | |||
10 | class LoginScreen extends Component<LoginScreenProps> { | ||
11 | render(): ReactElement { | ||
12 | const { actions, stores, error } = this.props; | ||
13 | return ( | ||
14 | <Login | ||
15 | onSubmit={actions.user.login} | ||
16 | isSubmitting={stores.user.loginRequest.isExecuting} | ||
17 | isTokenExpired={stores.user.isTokenExpired} | ||
18 | isServerLogout={ | ||
19 | stores.user.logoutReason === stores.user.logoutReasonTypes.SERVER | ||
20 | } | ||
21 | signupRoute={stores.user.signupRoute} | ||
22 | passwordRoute={stores.user.passwordRoute} | ||
23 | error={error} | ||
24 | /> | ||
25 | ); | ||
26 | } | ||
27 | } | ||
28 | |||
29 | export default inject('stores', 'actions')(observer(LoginScreen)); | ||