feat(SW-667): read more section to join loyalty sidebar
This commit is contained in:
@@ -10,6 +10,7 @@ import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
import Contact from "./Contact"
|
||||
import ReadMore from "./ReadMore"
|
||||
|
||||
import styles from "./joinLoyalty.module.css"
|
||||
|
||||
@@ -18,15 +19,15 @@ import type { JoinLoyaltyContactProps } from "@/types/components/sidebar/joinLoy
|
||||
export default async function JoinLoyaltyContact({
|
||||
block,
|
||||
}: JoinLoyaltyContactProps) {
|
||||
const intl = await getIntl()
|
||||
const user = await getName()
|
||||
const [intl, user] = await Promise.all([getIntl(), getName()])
|
||||
|
||||
// Check if we have user, that means we are logged in.
|
||||
if (user) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<section>
|
||||
<section className={styles.joinLoyaltyContainer}>
|
||||
<article className={styles.wrapper}>
|
||||
<Title as="h4" level="h3" textTransform="capitalize">
|
||||
{block.title}
|
||||
@@ -70,6 +71,7 @@ export default async function JoinLoyaltyContact({
|
||||
</section>
|
||||
</article>
|
||||
{block.contact ? <Contact contactBlock={block.contact} /> : null}
|
||||
<ReadMore />
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user