Fix tags page

This commit is contained in:
James Grugett 2022-05-05 17:34:16 -04:00
parent b2ff402587
commit 042fdb3cbe
2 changed files with 7 additions and 2 deletions

View File

@ -160,7 +160,7 @@ const useFilterCreator = (creatorId: string | undefined) => {
const useFilterTag = (tag: string | undefined) => { const useFilterTag = (tag: string | undefined) => {
const { refine } = useRefinementList({ attribute: 'lowercaseTags' }) const { refine } = useRefinementList({ attribute: 'lowercaseTags' })
useEffect(() => { useEffect(() => {
if (tag) refine(`${tag.toLowerCase()} OR ManifoldMarkets`) if (tag) refine(tag.toLowerCase())
}, [tag, refine]) }, [tag, refine])
} }

View File

@ -7,11 +7,16 @@ export default function TagPage() {
const router = useRouter() const router = useRouter()
const { tag } = router.query as { tag: string } const { tag } = router.query as { tag: string }
// TODO: Fix error: The provided `href` (/tag/[tag]?s=newest) value is missing query values (tag)
return ( return (
<Page> <Page>
<Title text={`#${tag}`} /> <Title text={`#${tag}`} />
<ContractSearch <ContractSearch
querySortOptions={{ filter: { tag }, defaultSort: 'newest' }} querySortOptions={{
filter: { tag },
defaultSort: 'newest',
shouldLoadFromStorage: false,
}}
/> />
</Page> </Page>
) )