feat(SW-667): read more section to join loyalty sidebar
This commit is contained in:
49
components/Sidebar/JoinLoyalty/ReadMore/index.tsx
Normal file
49
components/Sidebar/JoinLoyalty/ReadMore/index.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
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], translationId: "FAQ" },
|
||||
{
|
||||
href: membershipTermsAndConditions[lang],
|
||||
translationId: "Membership terms and conditions",
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
<article className={styles.wrapper}>
|
||||
<Subtitle>{intl.formatMessage({ id: "Read more" })}</Subtitle>
|
||||
<div className={styles.links}>
|
||||
{links.map((link) => {
|
||||
const translatedText = intl.formatMessage({ id: link.translationId })
|
||||
return (
|
||||
<Link
|
||||
key={link.translationId}
|
||||
size="small"
|
||||
className={styles.link}
|
||||
color="burgundy"
|
||||
href={link.href}
|
||||
>
|
||||
<ArrowRight
|
||||
color="burgundy"
|
||||
className={styles.icon}
|
||||
height="20"
|
||||
width="20"
|
||||
/>
|
||||
{translatedText}
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user