From 4d642e312ed728ad51c454d1e2a0b7bb350fc174 Mon Sep 17 00:00:00 2001
From: Piotr Russ <mail@pruss.it>
Date: Sun, 6 Dec 2020 23:49:13 +0100
Subject: first creator page

---
 client/src/admin/jsx/layout/TopBar.jsx | 35 ++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 client/src/admin/jsx/layout/TopBar.jsx

(limited to 'client/src/admin/jsx/layout/TopBar.jsx')

diff --git a/client/src/admin/jsx/layout/TopBar.jsx b/client/src/admin/jsx/layout/TopBar.jsx
new file mode 100644
index 0000000..b6564f7
--- /dev/null
+++ b/client/src/admin/jsx/layout/TopBar.jsx
@@ -0,0 +1,35 @@
+import React, {useState} from 'react';
+import LangSwitch from './LangSwitch.jsx';
+import UserSwitch from './UserSwitch.jsx';
+
+const TopBar = ({ user, setUser, lang, setLang }) => {
+  const [opened, setOpened] = useState(false);
+
+  return (
+    <div className="top-bar">
+      { opened !== false && (
+        <div
+          className="top-bar__fog"
+          onClick={() => setOpened(false)}
+        />
+      )}
+      <LangSwitch
+        lang={lang}
+        setLang={setLang}
+        opened={opened}
+        setOpened={setOpened}
+      />
+        { user && (
+          <UserSwitch
+            user={user}
+            setUser={setUser}
+            opened={opened}
+            setOpened={setOpened}
+          />
+        )
+      }
+    </div>
+  );
+};
+
+export default TopBar;
-- 
cgit v1.2.3

