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

Commit fb79469

Browse files
committed
Update author properties to include .node
Update accessing author properties to include .node as part of the upgrade of WPGraphQL to 0.12.1 See #17
1 parent d67e731 commit fb79469

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/avatar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import PropTypes from 'prop-types'
22

33
export default function Avatar({author}) {
44
const name =
5-
author.firstName && author.lastName
6-
? `${author.firstName} ${author.lastName}`
7-
: author.name
5+
author.node.firstName && author.node.lastName
6+
? `${author.node.firstName} ${author.node.lastName}`
7+
: author.node.name
88

99
return (
1010
<div className="flex items-center">
1111
<img
12-
src={author.avatar.url}
12+
src={author.node.avatar.url}
1313
className="w-12 h-12 rounded-full mr-4"
1414
alt={name}
1515
/>

0 commit comments

Comments
 (0)