From a1427af6606e7603ccf8b02d182bb063ff9b4a2a Mon Sep 17 00:00:00 2001 From: Oleksandra Date: Thu, 7 Dec 2023 19:26:05 +0200 Subject: [PATCH 1/2] add navigation via profile icon --- .../HeaderFooter/header/navbar/Profile.jsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx b/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx index a65c440a8..56bdb0f87 100644 --- a/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx +++ b/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx @@ -1,16 +1,27 @@ +import { Link, useNavigate } from 'react-router-dom'; + +import { useUser } from '../../../../hooks'; + +import DropdownMenu from './DropdownMenu'; +import Logout from './Logout'; import avatar_image from './Avatar.png'; import css from './Profile.module.css'; -import { Link } from 'react-router-dom'; -import Logout from './Logout'; -import DropdownMenu from './DropdownMenu'; + function Profile() { + const { user } = useUser(); + const navigate = useNavigate(); + const navigateToProfile = () => { + navigate(`/profile-detail/${user.profile_id}`); + }; + return (
Профіль From 96d0abfd376ad1b66ae7c7a0c1b2772dafa52604 Mon Sep 17 00:00:00 2001 From: Oleksandra Date: Thu, 7 Dec 2023 19:30:12 +0200 Subject: [PATCH 2/2] organize imports --- FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx b/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx index 56bdb0f87..828695f9f 100644 --- a/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx +++ b/FrontEnd/src/components/HeaderFooter/header/navbar/Profile.jsx @@ -4,8 +4,8 @@ import { useUser } from '../../../../hooks'; import DropdownMenu from './DropdownMenu'; import Logout from './Logout'; -import avatar_image from './Avatar.png'; import css from './Profile.module.css'; +import avatar_image from './Avatar.png'; function Profile() {