Skip to content

Commit 44d51d4

Browse files
committed
Filter Volumetric Project Research Team to only show the Project Owner.
1 parent ba7abe0 commit 44d51d4

File tree

1 file changed

+8
-1
lines changed
  • packages/app-project/pages/[panoptesEnv]/[owner]/[project]/about

1 file changed

+8
-1
lines changed

packages/app-project/pages/[panoptesEnv]/[owner]/[project]/about/team.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,27 @@ import fetchTeam from '@helpers/fetchTeam'
77
export async function getStaticProps({ locale, params }) {
88
const { notFound, props } = await getDefaultPageProps({ locale, params })
99
const { panoptesEnv } = params
10+
1011
const { project } = props.initialState
1112
const page = await fetchProjectPage(project, locale, 'team', panoptesEnv)
1213
const pageTitle = page?.strings?.title ?? 'Team'
1314

1415
const teamArray = await fetchTeam(project, panoptesEnv)
1516

17+
// Axonal Pathfinders Project is the 1st Volumetric Project and requests only showing the owner due to animal ethics concerns and researcher privacy
18+
const isVolumetricProject = project.experimental_tools.indexOf('volumetricProject') > -1
19+
const teamArrayFiltered = (isVolumetricProject)
20+
? teamArray.filter(user => user.roles.indexOf('owner') > -1)
21+
: teamArray
22+
1623
return {
1724
notFound,
1825
props: {
1926
...(await serverSideTranslations(locale, ['components', 'screens'])),
2027
pageTitle,
2128
pageType: 'team',
2229
...props,
23-
teamArray: teamArray
30+
teamArray: teamArrayFiltered
2431
},
2532
revalidate: 60
2633
}

0 commit comments

Comments
 (0)