Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions apps/web/src/shared/components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { useGetUserInfo } from "@ssok/api";
import { AvatarProfile, Button, cn } from "@ssok/ui";
import Link from "next/link";
import { usePathname } from "next/navigation";
import SsokLogo from "@/shared/assets/ssok-logo.svg";
import useSession from "@/shared/hooks/use-session";

Expand All @@ -12,8 +11,6 @@ export interface HeaderProps {
}

const Header = ({ className }: HeaderProps) => {
const pathname = usePathname();

const { accessToken } = useSession();
const { data: userInfo } = useGetUserInfo({
query: { enabled: !!accessToken },
Expand All @@ -38,23 +35,18 @@ const Header = ({ className }: HeaderProps) => {
<Link href="/" className="flex items-center">
<SsokLogo className="h-[3.2rem] w-[8rem]" />
</Link>

<nav className="flex items-center gap-[4rem]">
{navItems.map((item) => {
const isActive = pathname === item.href;
return (
<Link
key={item.href}
href={item.href}
className={cn(
"text-body3-semi15 transition-colors",
isActive ? "text-primary-60" : "text-neutral-20",
)}
>
{item.label}
</Link>
);
})}
{navItems.map((item) => (
<Link
key={item.href}
href={item.href}
className={cn(
"text-body3-semi15 text-neutral-20 transition-colors hover:text-primary-60",
)}
>
{item.label}
</Link>
))}
</nav>
</div>

Expand Down