feat(SW-185): Refactor mocked data
This commit is contained in:
@@ -6,7 +6,7 @@ import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import { detailsData } from "../mockedData"
|
||||
import { footer } from "../mockedData"
|
||||
|
||||
import styles from "./details.module.css"
|
||||
|
||||
@@ -20,6 +20,13 @@ function socialIcon(iconName: string): JSX.Element | null {
|
||||
export default function FooterDetails() {
|
||||
const lang = getLang()
|
||||
const currentYear = new Date().getFullYear()
|
||||
const {
|
||||
socialMedia,
|
||||
copyrightCompany,
|
||||
copyrightInfo,
|
||||
tertiaryLinks,
|
||||
languageSwitcher,
|
||||
} = footer
|
||||
return (
|
||||
<section className={styles.details}>
|
||||
<div className={styles.topContainer}>
|
||||
@@ -36,7 +43,7 @@ export default function FooterDetails() {
|
||||
/>
|
||||
</Link>
|
||||
<nav className={styles.socialNav}>
|
||||
{detailsData.social.links.map((link) => (
|
||||
{socialMedia.links.map((link) => (
|
||||
<a
|
||||
className={styles.socialLink}
|
||||
color="white"
|
||||
@@ -53,15 +60,15 @@ export default function FooterDetails() {
|
||||
<div className={styles.bottomContainer}>
|
||||
<div className={styles.copyrightContainer}>
|
||||
<Footnote textTransform="uppercase">
|
||||
© {currentYear} {detailsData.copyrightCompany}
|
||||
© {currentYear} {copyrightCompany}
|
||||
</Footnote>
|
||||
<Footnote textTransform="uppercase" color="peach50">
|
||||
{detailsData.copyrightInfo}
|
||||
{copyrightInfo}
|
||||
</Footnote>
|
||||
</div>
|
||||
<div className={styles.navigationContainer}>
|
||||
<nav className={styles.navigation}>
|
||||
{detailsData.links.map((link) => (
|
||||
{tertiaryLinks.map((link) => (
|
||||
<Footnote asChild textTransform="uppercase" key={link.id}>
|
||||
<Link
|
||||
className={styles.link}
|
||||
@@ -78,7 +85,7 @@ export default function FooterDetails() {
|
||||
{
|
||||
// This will be changed to the new LangueSwitcher that is done in the header branch, when implementing contentstack
|
||||
}
|
||||
<LanguageSwitcher urls={detailsData.languageSwitcher.urls} />
|
||||
<LanguageSwitcher urls={languageSwitcher.urls} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user