Sort fold & tag markets by 24-hour-vol

This commit is contained in:
James Grugett 2022-02-07 23:03:55 -06:00
parent 1cf7b42597
commit 19baf86963
4 changed files with 4 additions and 10 deletions

View File

@ -35,7 +35,7 @@ export function useQueryAndSortParams(options?: { defaultSort: Sort }) {
}
return {
sort: sort ?? options?.defaultSort ?? 'creator',
sort: sort ?? options?.defaultSort ?? '24-hour-vol',
query: query ?? '',
setSort,
setQuery,

View File

@ -158,9 +158,7 @@ export default function FoldPage(props: {
const fold = useFold(props.fold?.id) ?? props.fold
const { query, setQuery, sort, setSort } = useQueryAndSortParams({
defaultSort: 'most-traded',
})
const { query, setQuery, sort, setSort } = useQueryAndSortParams()
const user = useUser()
const isCurator = user && fold && user.id === fold.curatorId

View File

@ -21,9 +21,7 @@ export async function getStaticProps() {
export default function Markets(props: { contracts: Contract[] }) {
const contracts = useContracts() ?? props.contracts ?? []
const { query, setQuery, sort, setSort } = useQueryAndSortParams({
defaultSort: '24-hour-vol',
})
const { query, setQuery, sort, setSort } = useQueryAndSortParams()
return (
<Page>

View File

@ -31,9 +31,7 @@ export default function TagPage(props: { contracts: Contract[] }) {
contract.lowercaseTags.includes(tag.toLowerCase())
)
const { query, setQuery, sort, setSort } = useQueryAndSortParams({
defaultSort: 'most-traded',
})
const { query, setQuery, sort, setSort } = useQueryAndSortParams()
return (
<Page>