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 { refine } = useRefinementList({ attribute: 'lowercaseTags' })
useEffect(() => {
if (tag) refine(`${tag.toLowerCase()} OR ManifoldMarkets`)
if (tag) refine(tag.toLowerCase())
}, [tag, refine])
}

View File

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