Skip to content

Commit

Permalink
Merge pull request #585 from us3r-network/F-reconstructProfile-bufan
Browse files Browse the repository at this point in the history
hide fav menu for others
  • Loading branch information
sin-bufan authored Mar 4, 2024
2 parents 5f98c44 + 473c70b commit a90d74a
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions apps/u3/src/container/profile/ProfileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ import { cn } from '@/lib/utils';
import LoginButtonV2 from '@/components/layout/LoginButtonV2';
import NavLinkItem from '@/components/layout/NavLinkItem';

interface ProfileMenuProps extends ComponentPropsWithRef<'div'> {
isSelf: boolean;
}

export default function ProfileMenu({
isSelf,
className,
...props
}: ComponentPropsWithRef<'div'>) {
}: ProfileMenuProps) {
const { user } = useParams();
const { pathname } = useLocation();
const pathSuffix = user ? `/${user}` : '';
Expand Down Expand Up @@ -43,12 +48,14 @@ export default function ProfileMenu({
>
Activity
</NavLinkItem>
<NavLinkItem
href={`/u/fav${pathSuffix}`}
active={pathname === `/u/fav${pathSuffix}`}
>
Favorites
</NavLinkItem>
{isSelf && (
<NavLinkItem
href={`/u/fav${pathSuffix}`}
active={pathname === `/u/fav${pathSuffix}`}
>
Favorites
</NavLinkItem>
)}
{/* <NavLinkItem
href={`/u/asset${pathSuffix}`}
active={pathname === `/u/asset${pathSuffix}`}
Expand Down

0 comments on commit a90d74a

Please sign in to comment.