refactor: infer types from zod validation
This commit is contained in:
@@ -35,16 +35,9 @@ export default function CardGrid({ card_grid }: CardGridProps) {
|
||||
}
|
||||
|
||||
function CardWrapper({ card }: CardProps) {
|
||||
const link = card.referenceConnection.edges.length
|
||||
? {
|
||||
href: card.referenceConnection.edges[0].node.url,
|
||||
title: _("Read more"),
|
||||
}
|
||||
: undefined
|
||||
|
||||
return (
|
||||
<div className={styles.cardWrapper}>
|
||||
<Card subtitle={card.subtitle} title={card.title} link={link} />
|
||||
<Card subtitle={card.subtitle} title={card.title} link={card.link} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user