Files
web/components/Sidebar/JoinLoyalty/ReadMore/index.tsx
2024-10-29 10:39:07 +01:00

50 lines
1.3 KiB
TypeScript

import { faq, membershipTermsAndConditions } from "@/constants/currentWebHrefs"
import ArrowRight from "@/components/Icons/ArrowRight"
import Link from "@/components/TempDesignSystem/Link"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import styles from "./readMore.module.css"
export default async function ReadMore() {
const [intl, lang] = await Promise.all([getIntl(), getLang()])
const links = [
{
href: faq[lang],
text: intl.formatMessage({ id: "FAQ" }),
},
{
href: membershipTermsAndConditions[lang],
text: intl.formatMessage({ id: "Membership terms and conditions" }),
},
]
return (
<article className={styles.wrapper}>
<Subtitle>{intl.formatMessage({ id: "Read more" })}</Subtitle>
<div className={styles.links}>
{links.map((link) => (
<Link
key={link.text}
size="small"
className={styles.link}
color="burgundy"
href={link.href}
>
<ArrowRight
color="burgundy"
className={styles.icon}
height="20"
width="20"
/>
{link.text}
</Link>
))}
</div>
</article>
)
}