From 00cb6bbaa3f0b5524e1b5a83fb94edc66b923ac4 Mon Sep 17 00:00:00 2001 From: Okeino McGowan Date: Wed, 16 Oct 2024 08:52:14 -0400 Subject: [PATCH] updated small issues --- src/components/molecules/card/conferencePerson.graphql | 2 +- .../cardSlider/section/conferencePresenters.graphql | 4 ++-- .../organisms/cardSlider/section/conferencePresenters.tsx | 2 +- src/containers/collection/presenters.graphql | 8 ++------ .../[language]/conferences/[id]/presenters/page/[i].tsx | 4 ++-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/components/molecules/card/conferencePerson.graphql b/src/components/molecules/card/conferencePerson.graphql index 637fd5626..a3fc587ca 100644 --- a/src/components/molecules/card/conferencePerson.graphql +++ b/src/components/molecules/card/conferencePerson.graphql @@ -7,7 +7,7 @@ fragment conferencePerson on Person { id url(size: 128) } - recordings(collectionId: $collectionId) { + recordings(collectionId: $id) { aggregate { count } diff --git a/src/components/organisms/cardSlider/section/conferencePresenters.graphql b/src/components/organisms/cardSlider/section/conferencePresenters.graphql index bc8805171..5437cab59 100644 --- a/src/components/organisms/cardSlider/section/conferencePresenters.graphql +++ b/src/components/organisms/cardSlider/section/conferencePresenters.graphql @@ -2,14 +2,14 @@ query getSectionConferencePresenters( $language: Language! $first: Int! = 30 $after: String = null - $collectionId: ID! + $id: ID! ) { persons( language: $language first: $first after: $after role: SPEAKER - collectionId: $collectionId + collectionId: $id orderBy: [ { field: RECORDING_COUNT, direction: DESC } { field: RECORDING_DOWNLOADS_ALL_TIME, direction: DESC } diff --git a/src/components/organisms/cardSlider/section/conferencePresenters.tsx b/src/components/organisms/cardSlider/section/conferencePresenters.tsx index cd1a934a4..ca1da3651 100644 --- a/src/components/organisms/cardSlider/section/conferencePresenters.tsx +++ b/src/components/organisms/cardSlider/section/conferencePresenters.tsx @@ -35,7 +35,7 @@ export default function Presenters(props: { return useInfiniteGetSectionConferencePresentersQuery(pageParamKey, { language: lang, first: 30, - collectionId, + id: collectionId, }); }; diff --git a/src/containers/collection/presenters.graphql b/src/containers/collection/presenters.graphql index d0f945ad1..08b78ad25 100644 --- a/src/containers/collection/presenters.graphql +++ b/src/containers/collection/presenters.graphql @@ -1,9 +1,5 @@ -query getCollectionPresentersPageData( - $collectionId: ID! - $offset: Int - $first: Int -) { - collection(id: $collectionId) { +query getCollectionPresentersPageData($id: ID!, $offset: Int, $first: Int) { + collection(id: $id) { id ...collectionPivot persons( diff --git a/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx b/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx index 7d0f20892..9a33341da 100644 --- a/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx +++ b/src/pages/[language]/conferences/[id]/presenters/page/[i].tsx @@ -23,11 +23,11 @@ export async function getStaticProps({ const languageRoute = params?.language as string; const intl = await getIntl(languageRoute); - const collectionId = params?.id as string; + const id = params?.id as string; return getPaginatedStaticProps( params, ({ first, offset }) => - getCollectionPresentersPageData({ collectionId, first, offset }), + getCollectionPresentersPageData({ id, first, offset }), (d) => d.collection?.persons.nodes, (d) => d.collection?.persons.aggregate?.count, (d) => ({