From f2fcc41cb17ece1fc5acf57809c5e3d61c236133 Mon Sep 17 00:00:00 2001
From: Piotr Russ <mail@pruss.it>
Date: Thu, 26 Nov 2020 22:20:54 +0100
Subject: completed jwt token login with refresh token, reduced db calls

---
 client/src/admin/jsx/App.jsx | 4 ++++
 1 file changed, 4 insertions(+)

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

diff --git a/client/src/admin/jsx/App.jsx b/client/src/admin/jsx/App.jsx
index 93b6a33..3a4da84 100644
--- a/client/src/admin/jsx/App.jsx
+++ b/client/src/admin/jsx/App.jsx
@@ -23,6 +23,10 @@ const App = () => {
     setInfo('no-saved-websites');
   }, []);
 
+  useEffect(() => {
+    user && setLang(user.language);
+  }, [user]);
+
   return (
     <Context.Provider value={{ lang, setHover, setInfo }}>
       <div className="main">
-- 
cgit v1.2.3

