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

Commit 27d0fec

Browse files
committed
Merge branch 'staging' of https://github.com/WebDevStudios/nextjs-wordpress-starter into feature/core-styling
# Conflicts: # pages/team/[[...slug]].js
2 parents 0990291 + 182850d commit 27d0fec

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

api/wordpress/teams/queryTeamById.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ const singleTeamFragment = gql`
1414
${seoPostFields}
1515
${authorPostFields}
1616
${featuredImagePostFields}
17+
teamMemberProfile {
18+
facebookUrl
19+
githubUrl
20+
instagramUrl
21+
linkedinUrl
22+
location
23+
websiteUrl
24+
twitterUrl
25+
title
26+
wordpressorgProfileUrl
27+
}
1728
}
1829
`
1930

api/wordpress/teams/queryTeamsArchive.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ const archiveTeamFragment = gql`
1010
${globalPostFields}
1111
excerpt
1212
${featuredImagePostFields}
13+
teamMemberProfile {
14+
easterEggUrl
15+
}
1316
}
1417
`
1518

pages/team/[[...slug]].js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,33 @@ export default function Team({post, archive, posts, pagination}) {
7272
<Breadcrumbs breadcrumbs={post.seo.breadcrumbs} />
7373
)}
7474
<RichText tag="h1">{post?.title}</RichText>
75+
<p>{post?.teamMemberProfile?.title}</p>
7576
<Blocks blocks={post?.blocks} />
77+
{!!post?.teamMemberProfile && (
78+
// Other profiles exist; this is a sample.
79+
<ul>
80+
{!!post.teamMemberProfile.facebookUrl && (
81+
<li>
82+
<a href={post.teamMemberProfile.facebookUrl}>Facebook</a>
83+
</li>
84+
)}
85+
{!!post.teamMemberProfile.linkedinUrl && (
86+
<li>
87+
<a href={post.teamMemberProfile.linkedinUrl}>LinkedIn</a>
88+
</li>
89+
)}
90+
{!!post.teamMemberProfile.twitterUrl && (
91+
<li>
92+
<a href={post.teamMemberProfile.twitterUrl}>Twitter</a>
93+
</li>
94+
)}
95+
{!!post.teamMemberProfile.githubUrl && (
96+
<li>
97+
<a href={post.teamMemberProfile.githubUrl}>GitHub</a>
98+
</li>
99+
)}
100+
</ul>
101+
)}
76102
</article>
77103
</Container>
78104
</Layout>

0 commit comments

Comments
 (0)