From a9dcf7fe5a13161d79686461cbe245d517b16909 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 17 May 2022 13:44:49 -0400 Subject: [PATCH] Default tag page to all filter --- web/components/contract-search.tsx | 4 ++-- web/pages/tag/[tag].tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index 12743a2d..7ec33d3e 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -195,13 +195,13 @@ export function ContractSearchInner(props: { filter === 'resolved' ? true : filter === 'all' ? undefined : false ) - const { showMore, hits, isLastPage } = useInfiniteHits() + const { showMore, hits, isLastPage, results } = useInfiniteHits() const contracts = hits as any as Contract[] const router = useRouter() const hasLoaded = contracts.length > 0 || router.isReady - if (!hasLoaded) return <> + if (!hasLoaded || !results) return <> return (