Skip to content

Commit

Permalink
updated small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
okeino committed Oct 16, 2024
1 parent e8a213d commit 00cb6bb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/molecules/card/conferencePerson.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fragment conferencePerson on Person {
id
url(size: 128)
}
recordings(collectionId: $collectionId) {
recordings(collectionId: $id) {
aggregate {
count
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function Presenters(props: {
return useInfiniteGetSectionConferencePresentersQuery(pageParamKey, {
language: lang,
first: 30,
collectionId,
id: collectionId,
});
};

Expand Down
8 changes: 2 additions & 6 deletions src/containers/collection/presenters.graphql
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/[language]/conferences/[id]/presenters/page/[i].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => ({
Expand Down

0 comments on commit 00cb6bb

Please sign in to comment.