Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 18622af

Browse files
committed
Fix an issue with the hero background image
It is returned as a string, not an object.
1 parent 591630d commit 18622af

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

components/organisms/Hero/Hero.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function Hero({
3333
className={cn(styles.hero, className)}
3434
style={{
3535
// These css custom properties are used inside the css module file to set the card's background image, tint overlay, and fallback bg color.
36-
'--image-url': `url(${backgroundImage.url})`,
36+
'--image-url': `url(${backgroundImage})`,
3737
'--image-tint-color': `${tailwindConfig.theme.colors.black['DEFAULT']}50`,
3838
'--image-fallback-color': `${tailwindConfig.theme.colors.grey['darkest']}`
3939
}}
@@ -58,10 +58,7 @@ export default function Hero({
5858
}
5959

6060
Hero.propTypes = {
61-
backgroundImage: PropTypes.shape({
62-
url: PropTypes.string,
63-
alt: PropTypes.string
64-
}),
61+
backgroundImage: PropTypes.string,
6562
body: PropTypes.string,
6663
className: PropTypes.string,
6764
ctaText: PropTypes.string,

0 commit comments

Comments
 (0)