File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import { usePathname } from "next/navigation";
5
5
import type { Link as LinkType } from "@/api/types" ;
6
6
7
7
import { Logo } from "@/components/Icons/Logo" ;
8
+ import { SocialLink } from "@/components/SocialLink/SocialLink" ;
9
+ import { links as socialLinks } from "@/lib/data" ;
8
10
import { theme } from "@/lib/theme" ;
9
11
import { cn } from "@/lib/utils" ;
10
12
@@ -18,24 +20,22 @@ interface HeaderProps {
18
20
export function Header ( { links } : HeaderProps ) {
19
21
const pathname = usePathname ( ) ;
20
22
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 " >
22
24
< Link href = "/" >
23
25
< Logo color = { theme ?. colors ?. jsconfYellow } size = "36" />
24
26
</ Link >
25
27
< div
26
28
className = { cn ( "hidden items-center md:flex" , links ? "gap-2" : "gap-4" ) }
27
29
>
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 } /> ) }
39
39
</ div >
40
40
{ links ?. length ? < MobileNav links = { links } activePath = { pathname } /> : null }
41
41
</ header >
You can’t perform that action at this time.
0 commit comments