11import React from "react" ;
2- import { Separator } from "../separator " ;
2+ import { Container } from "../container " ;
33import { Heading } from "../heading" ;
44import { Link } from "../link" ;
5- import { Link as LinkType } from "./types " ;
5+ import { Separator } from "../separator " ;
66import { Text } from "../text" ;
7- import { Container } from "../container " ;
7+ import type { Link as LinkType } from "./types " ;
88
99export const Menu = ( {
1010 mainLinks,
@@ -20,49 +20,60 @@ export const Menu = ({
2020
2121 return (
2222 < div >
23- < Separator />
24- < Container className = "py-8 lg:py-20" >
25- < div className = "grid grid-cols-1 gap-4 lg:gap-14 lg:grid-cols-2" >
26- { mainLinksSplit
27- . filter ( ( split ) => split . length > 0 )
28- . map ( ( split , index ) => (
29- < ul
30- className = "grid grid-cols-1 content-start gap-4 lg:gap-6"
31- key = { index }
32- >
33- { split . map ( ( { text, link } ) => (
34- < li key = { `${ text } ${ link } ` } >
35- < Link hoverColor = "caramel" href = { link } >
36- < Heading color = "none" size = "display2" >
37- { text }
38- </ Heading >
39- </ Link >
40- </ li >
23+ { mainLinks . length > 0 && (
24+ < >
25+ < Separator />
26+ < Container className = "py-8 lg:py-20" >
27+ < div className = "grid grid-cols-1 gap-4 lg:gap-14 lg:grid-cols-2" >
28+ { mainLinksSplit
29+ . filter ( ( split ) => split . length > 0 )
30+ . map ( ( split , index ) => (
31+ < ul
32+ className = "grid grid-cols-1 content-start gap-4 lg:gap-6"
33+ key = { index }
34+ >
35+ { split . map ( ( { text, link } ) => (
36+ < li key = { `${ text } ${ link } ` } >
37+ < Link hoverColor = "caramel" href = { link } >
38+ < Heading color = "none" size = "display2" >
39+ { text }
40+ </ Heading >
41+ </ Link >
42+ </ li >
43+ ) ) }
44+ </ ul >
4145 ) ) }
42- </ ul >
43- ) ) }
44- </ div >
45- </ Container >
46- < Separator />
47- < Container className = "py-8 lg:py-10" >
48- < div className = "grid grid-cols-1 lg:grid-cols-4 gap-4 lg:gap-14" >
49- { secondaryLinksSplit
50- . filter ( ( split ) => split . length > 0 )
51- . map ( ( secondaryLinks , index ) => (
52- < ul key = { index } className = "grid grid-cols-1 gap-4 content-start" >
53- { secondaryLinks . map ( ( { link, text } ) => (
54- < li key = { `${ text } ${ link } ` } >
55- < Link hoverColor = "caramel" href = { link } >
56- < Heading color = "none" size = { 4 } >
57- { text }
58- </ Heading >
59- </ Link >
60- </ li >
46+ </ div >
47+ </ Container >
48+ </ >
49+ ) }
50+ { secondaryLinks . length > 0 && (
51+ < >
52+ < Separator />
53+ < Container className = "py-8 lg:py-10" >
54+ < div className = "grid grid-cols-1 lg:grid-cols-4 gap-4 lg:gap-14" >
55+ { secondaryLinksSplit
56+ . filter ( ( split ) => split . length > 0 )
57+ . map ( ( secondaryLinks , index ) => (
58+ < ul
59+ key = { index }
60+ className = "grid grid-cols-1 gap-4 content-start"
61+ >
62+ { secondaryLinks . map ( ( { link, text } ) => (
63+ < li key = { `${ text } ${ link } ` } >
64+ < Link hoverColor = "caramel" href = { link } >
65+ < Heading color = "none" size = { 4 } >
66+ { text }
67+ </ Heading >
68+ </ Link >
69+ </ li >
70+ ) ) }
71+ </ ul >
6172 ) ) }
62- </ ul >
63- ) ) }
64- </ div >
65- </ Container >
73+ </ div >
74+ </ Container >
75+ </ >
76+ ) }
6677 { bottomBarLink && (
6778 < >
6879 < Separator />
0 commit comments