Skip to content

Commit 835e49f

Browse files
committed
fix(Header): include social links on NOHeader pages
1 parent de88887 commit 835e49f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/components/Header/Header.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { usePathname } from "next/navigation";
55
import type { Link as LinkType } from "@/api/types";
66

77
import { Logo } from "@/components/Icons/Logo";
8+
import { SocialLink } from "@/components/SocialLink/SocialLink";
9+
import { links as socialLinks } from "@/lib/data";
810
import { theme } from "@/lib/theme";
911
import { cn } from "@/lib/utils";
1012

@@ -18,24 +20,22 @@ interface HeaderProps {
1820
export function Header({ links }: HeaderProps) {
1921
const pathname = usePathname();
2022
return (
21-
<header className="container relative z-10 mx-auto flex h-20 max-w-[1136px] items-center justify-between p-4">
23+
<header className="container relative z-10 mx-auto flex h-20 max-w-[1136px] items-center justify-between p-4 text-jsconf-yellow">
2224
<Link href="/">
2325
<Logo color={theme?.colors?.jsconfYellow} size="36" />
2426
</Link>
2527
<div
2628
className={cn("hidden items-center md:flex", links ? "gap-2" : "gap-4")}
2729
>
28-
{links &&
29-
links.map(
30-
(link) =>
31-
link && (
32-
<HeaderLink
33-
key={link.url}
34-
isActive={pathname == link.url}
35-
{...link}
36-
/>
37-
),
38-
)}
30+
{links
31+
? links.map((link) => (
32+
<HeaderLink
33+
key={link.url}
34+
isActive={pathname == link.url}
35+
{...link}
36+
/>
37+
))
38+
: socialLinks.map((link) => <SocialLink key={link.id} link={link} />)}
3939
</div>
4040
{links?.length ? <MobileNav links={links} activePath={pathname} /> : null}
4141
</header>

0 commit comments

Comments
 (0)