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

Commit b248117

Browse files
committed
simplify profile acf fields
1 parent c8cfc02 commit b248117

File tree

3 files changed

+6
-38
lines changed

3 files changed

+6
-38
lines changed

api/wordpress/teams/queryTeamById.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,8 @@ const singleTeamFragment = gql`
1515
${authorPostFields}
1616
${featuredImagePostFields}
1717
teamMemberProfile {
18-
facebookUrl
19-
githubUrl
20-
instagramUrl
21-
linkedinUrl
2218
location
23-
websiteUrl
24-
twitterUrl
2519
title
26-
wordpressorgProfileUrl
2720
}
2821
}
2922
`

api/wordpress/teams/queryTeamsArchive.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
import {gql} from '@apollo/client'
2-
import globalPostFields from '../_partials/globalPostFields'
3-
import featuredImagePostFields from '../_partials/featuredImagePostFields'
42
import archivePageInfo from '../_partials/archivePageInfo'
53
import defaultPageData from '../_partials/defaultPageData'
4+
import featuredImagePostFields from '../_partials/featuredImagePostFields'
5+
import globalPostFields from '../_partials/globalPostFields'
66

77
// Fragment: retrieve archive team fields.
88
const archiveTeamFragment = gql`
99
fragment ArchiveTeamFields on Team {
1010
${globalPostFields}
1111
excerpt
1212
${featuredImagePostFields}
13-
teamMemberProfile {
14-
easterEggUrl
15-
}
1613
}
1714
`
1815

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

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -72,33 +72,11 @@ 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>
75+
<p>
76+
{post?.teamMemberProfile?.title} -{' '}
77+
{post?.teamMemberProfile?.location}
78+
</p>
7679
<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-
)}
10280
</article>
10381
</Container>
10482
</Layout>

0 commit comments

Comments
 (0)