87 lines
2.8 KiB
TypeScript
87 lines
2.8 KiB
TypeScript
import Image from "@/components/Image"
|
|
import Link from "@/components/TempDesignSystem/Link"
|
|
import Body from "@/components/TempDesignSystem/Text/Body"
|
|
import { getLang } from "@/i18n/serverContext"
|
|
|
|
import styles from "./secondarynav.module.css"
|
|
|
|
import { AppDownLoadLinks } from "@/types/components/footer/appDownloadIcons"
|
|
import { type FooterSecondaryNavProps } from "@/types/components/footer/navigation"
|
|
|
|
export default function FooterSecondaryNav({
|
|
secondaryLinks,
|
|
appDownloads,
|
|
}: FooterSecondaryNavProps) {
|
|
const lang = getLang()
|
|
|
|
return (
|
|
<div className={styles.secondaryNavigation}>
|
|
{appDownloads && (
|
|
<nav className={styles.secondaryNavigationGroup}>
|
|
<Body color="peach80" textTransform="uppercase">
|
|
{appDownloads.title}
|
|
</Body>
|
|
<ul className={styles.secondaryNavigationList}>
|
|
{appDownloads.links.map(
|
|
(link) =>
|
|
link.href && (
|
|
<li key={link.type} className={styles.appDownloadItem}>
|
|
<a
|
|
href={link.href.href}
|
|
target="_blank"
|
|
aria-label={link.href.title}
|
|
>
|
|
<Image
|
|
src={
|
|
AppDownLoadLinks[
|
|
`${link.type}_${lang}` as keyof typeof AppDownLoadLinks
|
|
]
|
|
}
|
|
alt=""
|
|
width={125}
|
|
height={40}
|
|
/>
|
|
</a>
|
|
</li>
|
|
)
|
|
)}
|
|
</ul>
|
|
</nav>
|
|
)}
|
|
{secondaryLinks.map((link) => (
|
|
<nav className={styles.secondaryNavigationGroup} key={link.title}>
|
|
<Body color="peach80" textTransform="uppercase">
|
|
{link.title}
|
|
</Body>
|
|
<ul className={styles.secondaryNavigationList}>
|
|
{link?.links?.map((link) => (
|
|
<li key={link.title} className={styles.secondaryNavigationItem}>
|
|
{link.isExternal ? (
|
|
<a
|
|
href={link.url}
|
|
key={link.title}
|
|
target={link.openInNewTab ? "_blank" : "_self"}
|
|
aria-label={link.title}
|
|
className={styles.secondaryNavigationLink}
|
|
>
|
|
{link.title}
|
|
</a>
|
|
) : (
|
|
<Link
|
|
href={link.url}
|
|
key={link.title}
|
|
target={link.openInNewTab ? "_blank" : "_self"}
|
|
color="burgundy"
|
|
>
|
|
{link.title}
|
|
</Link>
|
|
)}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</nav>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|