From 6bff2bb5439d25e0ab2a24a8ca1b28b89ef40ff9 Mon Sep 17 00:00:00 2001
From: Ricardo Cino <ricardo@cino.io>
Date: Sun, 26 Jun 2022 23:59:32 +0200
Subject: chore: turned all auth containers into typescript (#375)

---
 src/containers/auth/LoginScreen.tsx | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 src/containers/auth/LoginScreen.tsx

(limited to 'src/containers/auth/LoginScreen.tsx')

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 @@
+import { Component, ReactElement } from 'react';
+import { inject, observer } from 'mobx-react';
+import { DefaultProps, GlobalError } from 'src/@types/ferdium-components.types';
+import Login from '../../components/auth/Login';
+
+interface LoginScreenProps extends DefaultProps {
+  error: GlobalError;
+}
+
+class LoginScreen extends Component<LoginScreenProps> {
+  render(): ReactElement {
+    const { actions, stores, error } = this.props;
+    return (
+      <Login
+        onSubmit={actions.user.login}
+        isSubmitting={stores.user.loginRequest.isExecuting}
+        isTokenExpired={stores.user.isTokenExpired}
+        isServerLogout={
+          stores.user.logoutReason === stores.user.logoutReasonTypes.SERVER
+        }
+        signupRoute={stores.user.signupRoute}
+        passwordRoute={stores.user.passwordRoute}
+        error={error}
+      />
+    );
+  }
+}
+
+export default inject('stores', 'actions')(observer(LoginScreen));
-- 
cgit v1.2.3-70-g09d2

