feat(SW-187): Added social media data and copyright label

This commit is contained in:
Pontus Dreij
2024-09-05 09:34:02 +02:00
parent 89e5d7515c
commit 144ab30bc6
17 changed files with 144 additions and 91 deletions

View File

@@ -5,46 +5,49 @@ import { getLang } from "@/i18n/serverContext"
import styles from "./secondarynav.module.css"
import {
AppDownLoadLinks,
type FooterSecondaryNavProps,
} from "@/types/components/footer/navigation"
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()
console.log("hej", JSON.stringify(secondaryLinks, null, 4))
return (
<div className={styles.secondaryNavigation}>
<nav className={styles.secondaryNavigationGroup}>
<Body color="peach80" textTransform="uppercase">
{appDownloads.title}
</Body>
<ul className={styles.secondaryNavigationList}>
{appDownloads.links.map((link) => (
<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={link.href.title}
width={125}
height={40}
/>
</a>
</li>
))}
</ul>
</nav>
{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={link.href.title}
width={125}
height={40}
/>
</a>
</li>
)
)}
</ul>
</nav>
)}
{secondaryLinks.map((link) => (
<nav className={styles.secondaryNavigationGroup} key={link.title}>
<Body color="peach80" textTransform="uppercase">
@@ -52,7 +55,7 @@ export default function FooterSecondaryNav({
</Body>
<ul className={styles.secondaryNavigationList}>
{link?.links?.map((link) => (
<li key={link.id} className={styles.secondaryNavigationItem}>
<li key={link.title} className={styles.secondaryNavigationItem}>
{link.isExternal ? (
<a
href={link.url}