Skip to content

Commit

Permalink
fix: hero image size
Browse files Browse the repository at this point in the history
  • Loading branch information
melniiv committed Dec 18, 2024
1 parent 48902b1 commit 193fabd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-helsinki-headless-cms",
"version": "1.0.0-alpha307",
"version": "1.0.0-alpha308",
"description": "React components for displaying Headless CMS content according to guidelines set by HDS",
"main": "cjs/index.js",
"module": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/core/pageContent/PageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export function PageContent(props: PageContentProps) {
}
heroContainer={heroContainer}
id={page?.id ?? 'page'}
imageSrc={page?.featuredImage?.node?.mediaItemUrl}
imageSrc={page?.featuredImage?.node?.medium_large}
imageAlt={page?.featuredImage?.node?.altText}
imageLabel={page?.featuredImage?.node?.photographerName}
backUrl={backUrl}
Expand Down
2 changes: 2 additions & 0 deletions src/core/pageContent/__mocks__/page.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const sidebarArticleList: LayoutArticle = {
altText: 'image description',
mediaItemUrl:
'https://kultus.app-staging.hkih.hion.dev/app/uploads/2022/01/ae0d30ec-w_c3391_l_web.jpeg',
medium_large: 'https://kultus.app-staging.hkih.hion.dev/app/uploads/2022/01/ae0d30ec-w_c3391_l_web.jpeg'
},
},
__typename: 'Post',
Expand Down Expand Up @@ -259,6 +260,7 @@ const mockPage: PageQuery['page'] = {
node: {
mediaItemUrl:
'https://api.hel.fi/linkedevents-test/media/images/a-sip_netin_tapahtumakuva.1080x648_T3brYn4.jpg',
medium_large: 'https://api.hel.fi/linkedevents-test/media/images/a-sip_netin_tapahtumakuva.1080x648_T3brYn4.jpg',
altText: 'Picture with content',
title: 'Picture with content title',
},
Expand Down

0 comments on commit 193fabd

Please sign in to comment.