From f8c43a414de2eeef2c794e74b8b5e4ce07ef78ec Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 8 May 2021 12:45:48 +0300 Subject: [PATCH] design improvement --- frontend/src/App.js | 59 +++++++++++++++++---- frontend/src/components/HeaderAuthorized.js | 39 ++------------ frontend/src/index.css | 9 +++- 3 files changed, 60 insertions(+), 47 deletions(-) diff --git a/frontend/src/App.js b/frontend/src/App.js index 7f61c39..2b322f7 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,12 +1,13 @@ import { useEffect } from 'react' import jwt_decode from 'jwt-decode' -import { BrowserRouter as Router, Route } from 'react-router-dom' +import { BrowserRouter as Router, Route, Link } from 'react-router-dom' import Footer from './components/Footer' import Routes from './components/routes/Routes' import { useDispatch, useSelector } from 'react-redux' import 'animate.css' +import { FaPowerOff, FaSlidersH } from 'react-icons/fa' +import { resetUpdateUser, logout } from './redux/users/usersSlice' -import { logout } from './redux/users/usersSlice' import HeaderGuest from './components/HeaderGuest' import HeaderAuthorized from './components/HeaderAuthorized' @@ -29,15 +30,55 @@ const App = () => { }) }, [dispatch]) + const style = { + display: 'flex', + } + + const logoutHandler = () => { + dispatch(logout()) + dispatch(resetUpdateUser()) + } + + const toggler = () => { + const sidebar = document.querySelector('#sidebar') + sidebar.classList.toggle('active') + } + return ( - {userInfo ? : } -
-
- -
-
-