Default tag page to all filter

This commit is contained in:
James Grugett 2022-05-17 13:44:49 -04:00
parent 844035c40d
commit a9dcf7fe5a
2 changed files with 3 additions and 2 deletions

View File

@ -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 (
<ContractsGrid

View File

@ -14,6 +14,7 @@ export default function TagPage() {
<ContractSearch
querySortOptions={{
defaultSort: 'newest',
defaultFilter: 'all',
shouldLoadFromStorage: false,
}}
additionalFilter={{ tag }}