diff options
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)); | ||