refactor: zod validation and pr comments
This commit is contained in:
@@ -5,7 +5,7 @@ import Title from "@/components/Title"
|
||||
|
||||
import styles from "./cardGrid.module.css"
|
||||
|
||||
import { CardGridProps, CardProps } from "@/types/components/loyalty/blocks"
|
||||
import { CardGridProps } from "@/types/components/loyalty/blocks"
|
||||
|
||||
export default function CardGrid({ card_grid }: CardGridProps) {
|
||||
return (
|
||||
@@ -27,17 +27,15 @@ export default function CardGrid({ card_grid }: CardGridProps) {
|
||||
</header>
|
||||
<div className={styles.cardContainer}>
|
||||
{card_grid.cards.map((card, i) => (
|
||||
<CardWrapper key={`${card.title}+${i}`} card={card} />
|
||||
<div className={styles.cardWrapper} key={`${card.title}+${i}`}>
|
||||
<Card
|
||||
subtitle={card.subtitle}
|
||||
title={card.title}
|
||||
link={card.link}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
function CardWrapper({ card }: CardProps) {
|
||||
return (
|
||||
<div className={styles.cardWrapper}>
|
||||
<Card subtitle={card.subtitle} title={card.title} link={card.link} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user