diff --git a/src/components/link/CustomLink.tsx b/src/components/link/CustomLink.tsx index 262d0ca12..7d58f7463 100644 --- a/src/components/link/CustomLink.tsx +++ b/src/components/link/CustomLink.tsx @@ -56,6 +56,7 @@ const CustomLink = ({ target={target} rel={rel} aria-label={link.ariaLabel} + scroll={scroll} > {link.linkTitle} @@ -87,6 +88,7 @@ const CustomLink = ({ target={target} rel={rel} aria-label={link.ariaLabel} + scroll={scroll} > {link.linkTitle} @@ -101,6 +103,7 @@ const CustomLink = ({ target={target} rel={rel} aria-label={link.ariaLabel} + scroll={scroll} > {link.linkTitle} diff --git a/src/components/navigation/header/Header.tsx b/src/components/navigation/header/Header.tsx index 84be6e246..412f3630a 100644 --- a/src/components/navigation/header/Header.tsx +++ b/src/components/navigation/header/Header.tsx @@ -99,8 +99,8 @@ export const Header = ({ className={styles.logo} scroll={false} /> - {renderPageLinks(links, false, pathname)} - {renderPageCTAs(ctas, false)} + +
{defaultLanguage && ( setIsOpen(false)} > - {renderPageLinks(sidebarLinks, true, pathname)} +
{defaultLanguage && ( @@ -182,39 +186,47 @@ export const Header = ({ ); }; -export const renderPageLinks = ( - links: ILink[], - isMobile: boolean, - pathname: string, -) => ( -
    - {links?.map((link: ILink) => { - const linkUrl = getHref(link); - const isSelected = pathname === `${linkUrl}`; - return ( +function PageLinks({ + links, + isMobile, + pathname, +}: { + links: ILink[]; + isMobile: boolean; + pathname: string; +}) { + return ( +
      + {links?.map((link: ILink) => { + const linkUrl = getHref(link); + const isSelected = pathname === `${linkUrl}`; + return ( +
    • + +
    • + ); + })} +
    + ); +} + +function PageCTAs({ ctas, isMobile }: { ctas: ILink[]; isMobile: boolean }) { + return ( +
      + {ctas?.map((link: ILink, index) => (
    • -
    • - ); - })} -
    -); - -export const renderPageCTAs = (ctas: ILink[], isMobile: boolean) => ( -
      - {ctas?.map((link: ILink, index) => ( -
    • - -
    • - ))} -
    -); + ))} +
+ ); +}