diff --git a/frontend/src/components/Datasets/ResultsDatasets.css b/frontend/src/components/Datasets/ResultsDatasets.css index acaca07..81b66f9 100644 --- a/frontend/src/components/Datasets/ResultsDatasets.css +++ b/frontend/src/components/Datasets/ResultsDatasets.css @@ -226,11 +226,11 @@ p a { .resultsRecord { display: flex; flex-direction: row; - height: 140%; flex-wrap: wrap; justify-content: center; align-content: center; - padding-bottom: 10px; + padding-bottom: 60px; + margin-top: 60px; } @media (max-width: 860px) { @@ -258,8 +258,8 @@ p a { justify-content: center; align-content: center; width: 100vw; - padding-bottom: 10px; - height: 160%; + margin-top: 60px; + padding-bottom: 60px; } .tittle4 { diff --git a/frontend/src/components/NavBar/Navbar.css b/frontend/src/components/NavBar/Navbar.css index 0756a3f..978b138 100644 --- a/frontend/src/components/NavBar/Navbar.css +++ b/frontend/src/components/NavBar/Navbar.css @@ -273,7 +273,7 @@ .Members3:hover ~ .animation { width: 150px; - right: 349px; + right: 20.5%; background-color: #4961b8; } diff --git a/frontend/src/components/NavBar/Navbar.js b/frontend/src/components/NavBar/Navbar.js index 799a07b..3bd7435 100644 --- a/frontend/src/components/NavBar/Navbar.js +++ b/frontend/src/components/NavBar/Navbar.js @@ -18,13 +18,18 @@ function Navbar () { logOutUser, authenticateUser, getStoredToken, - userNameToShare + userNameToShare, + setUserNameToShare } = useContext(AuthContext) const auth = useAuth() const navigate = useNavigate() useEffect(() => { + let user = localStorage.getItem('userName') + if (user !== ''){ + setUserNameToShare(user) + } authenticateUser() let token = getStoredToken() let isAuthenticated = false @@ -39,7 +44,7 @@ function Navbar () { } else { setIsLoggedIn(false) } - }, []) + }, [userNameToShare]) const handleHelpModal1 = () => { setIsOpenModal1(true) diff --git a/frontend/src/components/SignIn/LoggedIn.js b/frontend/src/components/SignIn/LoggedIn.js index a5e248a..2cd4075 100644 --- a/frontend/src/components/SignIn/LoggedIn.js +++ b/frontend/src/components/SignIn/LoggedIn.js @@ -10,7 +10,10 @@ const LoggedIn = () => { if (auth && auth.userData) { setIsLoggedIn(true) - setUserNameToShare(auth.userData.profile.name) + + setUserNameToShare( + localStorage.setItem('userName', auth.userData.profile.name) + ) return (