@@ -12,6 +12,7 @@ const logo: string = require("../../assets/logo.svg").default;
1212const profile : string = require ( "../../assets/avatar.png" ) . default ;
1313const LogoWhite : string = require ( "../../assets/logoWhite.svg" ) . default ;
1414import jwtDecode from "jwt-decode" ;
15+ import { destination } from '../../utils/utils'
1516
1617const placeholderImage = profile ;
1718
@@ -20,6 +21,7 @@ const onImageError = (e) => {
2021}
2122
2223function NavBar ( ) {
24+ const userDestination = destination ( ) ;
2325 const access_token = localStorage . getItem ( "access_token" ) ;
2426 //@ts -ignore
2527 const user = access_token ? jwtDecode ( access_token ) . picture : profile ;
@@ -35,7 +37,10 @@ function NavBar() {
3537 const handleShowProfileDropdown = ( ) =>
3638 setShowprofileDropdown ( ! showProfileDropdown ) ;
3739
40+
41+
3842 return (
43+
3944 < div className = "flex items-center dark:bg-zinc-800 " >
4045 { showProfileDropdown && (
4146 < ProfileDropdown
@@ -59,8 +64,9 @@ function NavBar() {
5964 < IoClose className = "w-7 text-9xl dark:text-dark-text-fill" />
6065 ) }
6166 </ span >
67+
6268 < span >
63- < Link to = "/" className = "flex items-center" >
69+ < Link to = { userDestination } className = "flex items-center" >
6470 { theme ? (
6571 < img
6672 className = "cursor-pointer mx-2 fill-[blue]"
@@ -79,6 +85,7 @@ function NavBar() {
7985 </ h1 >
8086 </ Link >
8187 </ span >
88+
8289 </ div >
8390 < div className = "flex items-center mr-4" >
8491 < span className = "flex items-center" >
0 commit comments