Skip to content

Commit

Permalink
fix(Header): include social links on NOHeader pages
Browse files Browse the repository at this point in the history
  • Loading branch information
joseglego committed Jun 11, 2024
1 parent de88887 commit 835e49f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { usePathname } from "next/navigation";
import type { Link as LinkType } from "@/api/types";

import { Logo } from "@/components/Icons/Logo";
import { SocialLink } from "@/components/SocialLink/SocialLink";
import { links as socialLinks } from "@/lib/data";
import { theme } from "@/lib/theme";
import { cn } from "@/lib/utils";

Expand All @@ -18,24 +20,22 @@ interface HeaderProps {
export function Header({ links }: HeaderProps) {
const pathname = usePathname();
return (
<header className="container relative z-10 mx-auto flex h-20 max-w-[1136px] items-center justify-between p-4">
<header className="container relative z-10 mx-auto flex h-20 max-w-[1136px] items-center justify-between p-4 text-jsconf-yellow">
<Link href="/">
<Logo color={theme?.colors?.jsconfYellow} size="36" />
</Link>
<div
className={cn("hidden items-center md:flex", links ? "gap-2" : "gap-4")}
>
{links &&
links.map(
(link) =>
link && (
<HeaderLink
key={link.url}
isActive={pathname == link.url}
{...link}
/>
),
)}
{links
? links.map((link) => (
<HeaderLink
key={link.url}
isActive={pathname == link.url}
{...link}
/>
))
: socialLinks.map((link) => <SocialLink key={link.id} link={link} />)}
</div>
{links?.length ? <MobileNav links={links} activePath={pathname} /> : null}
</header>
Expand Down

0 comments on commit 835e49f

Please sign in to comment.