From f55ab69ce8ef135869e591126889192b66df86dc Mon Sep 17 00:00:00 2001 From: Bram Borggreve Date: Wed, 3 Jan 2024 00:48:55 +0000 Subject: [PATCH] fix: show all the collections in the dropdown on the Report page --- .../data-access/src/lib/use-admin-find-many-collection.ts | 4 ++-- libs/web/report/feature/src/lib/web-admin-report-index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/web/collection/data-access/src/lib/use-admin-find-many-collection.ts b/libs/web/collection/data-access/src/lib/use-admin-find-many-collection.ts index 8fa9fcd..bccb478 100644 --- a/libs/web/collection/data-access/src/lib/use-admin-find-many-collection.ts +++ b/libs/web/collection/data-access/src/lib/use-admin-find-many-collection.ts @@ -6,11 +6,11 @@ import { showNotificationError, showNotificationSuccess } from '@pubkey-link/web import { useQuery } from '@tanstack/react-query' import { useState } from 'react' -export function useAdminFindManyCollection() { +export function useAdminFindManyCollection(props?: Partial) { const sdk = useWebSdk() const [network, setNetwork] = useState(undefined) - const [limit, setLimit] = useState(10) + const [limit, setLimit] = useState(props?.limit ?? 10) const [page, setPage] = useState(1) const [search, setSearch] = useState('') diff --git a/libs/web/report/feature/src/lib/web-admin-report-index.tsx b/libs/web/report/feature/src/lib/web-admin-report-index.tsx index cca96d0..3cab216 100644 --- a/libs/web/report/feature/src/lib/web-admin-report-index.tsx +++ b/libs/web/report/feature/src/lib/web-admin-report-index.tsx @@ -8,7 +8,7 @@ import { useState } from 'react' export function WebAdminReportIndex() { const { serverOptions, items } = useAdminFindManyDiscordServer({ input: {} }) - const { collectionOptions } = useAdminFindManyCollection() + const { collectionOptions } = useAdminFindManyCollection({ limit: 50 }) const [server, setServer] = useState(undefined) const [report, setReport] = useState() const [collectionAccount, setCollectionAccount] = useState()