fix(BOOK-204): Added dynamic h1 to startpage
Approved-by: Christel Westerberg
This commit is contained in:
@@ -11,10 +11,12 @@ import type { JoinScandicFriends } from "@/types/trpc/routers/contentstack/start
|
||||
|
||||
interface JoinScandicFriendsProps {
|
||||
content: JoinScandicFriends
|
||||
headingLevel?: "h1" | "h2"
|
||||
}
|
||||
|
||||
export default async function JoinScandicFriends({
|
||||
content,
|
||||
headingLevel = "h2",
|
||||
}: JoinScandicFriendsProps) {
|
||||
const isLoggedIn = await isLoggedInUser()
|
||||
if (isLoggedIn) {
|
||||
@@ -22,6 +24,7 @@ export default async function JoinScandicFriends({
|
||||
}
|
||||
|
||||
const { show_header, show_usp, usp, primary_button } = content
|
||||
const Hx = headingLevel
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
@@ -49,7 +52,7 @@ export default async function JoinScandicFriends({
|
||||
</Typography>
|
||||
) : null}
|
||||
<Typography variant="Title/xs">
|
||||
<h2 className={styles.heading}>{content.title}</h2>
|
||||
<Hx className={styles.heading}>{content.title}</Hx>
|
||||
</Typography>
|
||||
</header>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user