diff --git a/components/Current/Footer/Navigation.tsx b/components/Current/Footer/Navigation.tsx index 199748fc0..50bc4e56f 100644 --- a/components/Current/Footer/Navigation.tsx +++ b/components/Current/Footer/Navigation.tsx @@ -1,17 +1,31 @@ -import { FooterNavigationProps } from "@/types/components/current/footer" -import { InternalLink, ExternalLink } from "@/types/requests/footer" +import { + FooterNavigationProps, + FooterNavigationItemProps, +} from "@/types/components/current/footer" +import Link from "next/link" -function getLink(linkObject: InternalLink | ExternalLink) { +function NavigationItem({ linkObject, lang }: FooterNavigationItemProps) { if (linkObject.__typename === "FooterNavigationLinksInternalLink") { - return { - title: linkObject.internal_link.link_text, - href: linkObject.internal_link.pageConnection.edges[0].node.url, - } + const href = `/${lang}${linkObject.internal_link.pageConnection.edges[0].node.url}` + return ( +
  • + {linkObject.internal_link.link_text} +
  • + ) } - return linkObject.external_link.link + return ( +
  • + + {linkObject.external_link.link.title} + +
  • + ) } -export default function Navigation({ linkGroups }: FooterNavigationProps) { +export default function Navigation({ + linkGroups, + lang, +}: FooterNavigationProps) { return ( -
    - +
    +

    @@ -74,10 +77,14 @@ export default async function Footer({ lang }: LangParams) { > { @@ -98,11 +105,13 @@ export default async function Footer({ lang }: LangParams) { > {

    -

    {footerData.social_media.title}

    +

    + {footerData.social_media.title} +

    - {footerData.social_media.facebook.title} + + {footerData.social_media.facebook.title} + @@ -192,7 +205,9 @@ display: none; role="img" aria-labelledby="social-icons twitter-icon" > - {footerData.social_media.twitter.title} + + {footerData.social_media.twitter.title} + @@ -210,13 +225,17 @@ display: none; role="img" aria-labelledby="social-icons instagram-icon" > - {footerData.social_media.instagram.title} + + {footerData.social_media.instagram.title} +
    -

    {footerData.trip_advisor.title}

    +

    + {footerData.trip_advisor.title} +