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 {
|
return {
|
||||||
sort: sort ?? options?.defaultSort ?? 'creator',
|
sort: sort ?? options?.defaultSort ?? '24-hour-vol',
|
||||||
query: query ?? '',
|
query: query ?? '',
|
||||||
setSort,
|
setSort,
|
||||||
setQuery,
|
setQuery,
|
||||||
|
|
|
@ -158,9 +158,7 @@ export default function FoldPage(props: {
|
||||||
|
|
||||||
const fold = useFold(props.fold?.id) ?? props.fold
|
const fold = useFold(props.fold?.id) ?? props.fold
|
||||||
|
|
||||||
const { query, setQuery, sort, setSort } = useQueryAndSortParams({
|
const { query, setQuery, sort, setSort } = useQueryAndSortParams()
|
||||||
defaultSort: 'most-traded',
|
|
||||||
})
|
|
||||||
|
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
const isCurator = user && fold && user.id === fold.curatorId
|
const isCurator = user && fold && user.id === fold.curatorId
|
||||||
|
|
|
@ -21,9 +21,7 @@ export async function getStaticProps() {
|
||||||
export default function Markets(props: { contracts: Contract[] }) {
|
export default function Markets(props: { contracts: Contract[] }) {
|
||||||
const contracts = useContracts() ?? props.contracts ?? []
|
const contracts = useContracts() ?? props.contracts ?? []
|
||||||
|
|
||||||
const { query, setQuery, sort, setSort } = useQueryAndSortParams({
|
const { query, setQuery, sort, setSort } = useQueryAndSortParams()
|
||||||
defaultSort: '24-hour-vol',
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
|
|
@ -31,9 +31,7 @@ export default function TagPage(props: { contracts: Contract[] }) {
|
||||||
contract.lowercaseTags.includes(tag.toLowerCase())
|
contract.lowercaseTags.includes(tag.toLowerCase())
|
||||||
)
|
)
|
||||||
|
|
||||||
const { query, setQuery, sort, setSort } = useQueryAndSortParams({
|
const { query, setQuery, sort, setSort } = useQueryAndSortParams()
|
||||||
defaultSort: 'most-traded',
|
|
||||||
})
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user