Sort fold & tag markets by 24-hour-vol
This commit is contained in:
parent
1cf7b42597
commit
19baf86963
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user