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

Commit 59318e8

Browse files
committed
Update featuredImage property to include .node
Update accessing featuredImage sourceUrl to include .node as part of the upgrade of WPGraphQL to 0.12.1 Before: featuredImage.sourceUrl After: featuredImage.node.sourceUrl See #17
1 parent fb79469 commit 59318e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/cover-image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Link from 'next/link'
55
export default function CoverImage({title, coverImage, slug}) {
66
const image = (
77
<img
8-
src={coverImage?.sourceUrl}
8+
src={coverImage?.node?.sourceUrl}
99
className={cn('shadow-small', {
1010
'hover:shadow-medium transition-shadow duration-200': slug
1111
})}

pages/posts/[slug].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function Post({post, posts, preview}) {
3737
</title>
3838
<meta
3939
property="og:image"
40-
content={post.featuredImage?.sourceUrl}
40+
content={post.featuredImage?.node?.sourceUrl}
4141
/>
4242
</Head>
4343
<PostHeader

0 commit comments

Comments
 (0)