From e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d Mon Sep 17 00:00:00 2001
From: Piotr Russ <mail@pruss.it>
Date: Mon, 16 Nov 2020 00:10:28 +0100
Subject: api, login, auth

---
 client/src/login/jsx/App.jsx | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 client/src/login/jsx/App.jsx

(limited to 'client/src/login/jsx/App.jsx')

diff --git a/client/src/login/jsx/App.jsx b/client/src/login/jsx/App.jsx
new file mode 100644
index 0000000..a0109dd
--- /dev/null
+++ b/client/src/login/jsx/App.jsx
@@ -0,0 +1,39 @@
+import React, { useState } from 'react';
+import ReactDOM from 'react-dom';
+
+import "../scss/index.scss";
+
+import texts from '../../common/data/texts.js';
+import TopBar from '../../common/jsx/TopBar.jsx';
+import Info from '../../common/jsx/Info.jsx';
+import LoginPanel from './LoginPanel.jsx';
+
+const App = () => {
+  const [lang, setLang] = useState('en');
+  const [info, setInfo] = useState('login-info');
+  const [hover, setHover] = useState('');
+  const [user, setUser] = useState(null);
+  const t = (key) => texts[lang][key] || texts['en'][key];
+
+  return (
+    <div className="main">
+      <TopBar
+        lang={lang}
+        setLang={setLang}
+        setHover={setHover}
+        t={t}
+      />
+      <LoginPanel
+        setUser={setUser}
+        t={t}
+      />
+      <Info
+        info={info}
+        hover={hover}
+        t={t}
+      />
+    </div>
+  )
+};
+
+ReactDOM.render(<App />, document.getElementById('app'));
-- 
cgit v1.2.3

