refactor(SW-302)
This commit is contained in:
@@ -12,19 +12,16 @@ import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
|
||||
export default function ActivitiesCardGrid(activitiesCard: ActivityCard) {
|
||||
const lang = getLang()
|
||||
const hasImage = activitiesCard.background_image
|
||||
const hasImage = activitiesCard.backgroundImage
|
||||
|
||||
const updatedCard: CardProps = {
|
||||
...activitiesCard,
|
||||
id: activities[lang],
|
||||
theme: hasImage ? "image" : "primaryDark",
|
||||
scriptedTopTitle: activitiesCard.scripted_title,
|
||||
heading: activitiesCard.heading,
|
||||
bodyText: activitiesCard.body_text,
|
||||
backgroundImage: hasImage ? activitiesCard.background_image : undefined,
|
||||
primaryButton: hasImage
|
||||
? {
|
||||
href: activitiesCard.contentPage.href,
|
||||
title: activitiesCard.cta_text,
|
||||
title: activitiesCard.ctaText,
|
||||
isExternal: false,
|
||||
}
|
||||
: undefined,
|
||||
@@ -32,7 +29,7 @@ export default function ActivitiesCardGrid(activitiesCard: ActivityCard) {
|
||||
? undefined
|
||||
: {
|
||||
href: activitiesCard.contentPage.href,
|
||||
title: activitiesCard.cta_text,
|
||||
title: activitiesCard.ctaText,
|
||||
isExternal: false,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user