fix: improve conditional Sidebar CSS
This commit is contained in:
@@ -8,12 +8,11 @@ import styles from "./loyaltyPage.module.css"
|
||||
|
||||
export default async function LoyaltyPage() {
|
||||
const loyaltyPage = await serverClient().contentstack.loyaltyPage.get()
|
||||
const hasSidebar = !!loyaltyPage.sidebar.length
|
||||
return (
|
||||
<section
|
||||
className={`${styles.content} ${hasSidebar && styles.hasLeftSidebar}`}
|
||||
>
|
||||
{hasSidebar && <Sidebar blocks={loyaltyPage.sidebar} />}
|
||||
<section className={styles.content}>
|
||||
{loyaltyPage.sidebar.length ? (
|
||||
<Sidebar blocks={loyaltyPage.sidebar} />
|
||||
) : null}
|
||||
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
{loyaltyPage.blocks ? <Blocks blocks={loyaltyPage.blocks} /> : null}
|
||||
|
||||
Reference in New Issue
Block a user