File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change 11import { isEmpty } from "lodash" ;
22import Link from "next/link" ;
33import { useState } from 'react'
4+ import { isCustomPageUri } from '../../../utils/slug' ;
45
56const Nav = ( { header, headerMenus} ) => {
67
@@ -39,16 +40,20 @@ const Nav = ({header, headerMenus}) => {
3940< div className = { `${ isMenuVisible ? 'max-h-full' : 'h-0' } overflow-hidden w-full lg:h-full block flex-grow lg:flex lg:items-center lg:w-auto` } >
4041{ headerMenus ?. length ? (
4142< div className = "text-sm lg:flex-grow" >
42- { headerMenus ?. map ( menu => (
43- < Link key = { menu ?. node ?. id } href = { menu ?. node ?. path } >
44- < a
45- className = "block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white mr-4"
46- data-cy = "nav-item"
47- >
48- { menu ?. node ?. label }
49- </ a >
50- </ Link >
51- ) ) }
43+ { headerMenus ?. map ( menu => {
44+ if ( ! isCustomPageUri ( menu ?. node ?. path ) ) {
45+ return (
46+ < Link key = { menu ?. node . id } href = { menu ?. node ?. path } >
47+ < a
48+ className = "block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white mr-4"
49+ data-cy = "nav-item"
50+ >
51+ { menu ?. node ?. label }
52+ </ a >
53+ </ Link >
54+ )
55+ }
56+ } ) }
5257< Link href = { '/blog/' } >
5358< a
5459className = "block mt-4 lg:inline-block lg:mt-0 text-teal-200 hover:text-white mr-4"
You can’t perform that action at this time.
0 commit comments