Default to 'all' search filter for markets on user page
This commit is contained in:
parent
b55e807c62
commit
2b9e639281
|
@ -43,6 +43,7 @@ type filter = 'open' | 'closed' | 'resolved' | 'all'
|
|||
export function ContractSearch(props: {
|
||||
querySortOptions?: {
|
||||
defaultSort: Sort
|
||||
defaultFilter?: filter
|
||||
filter?: {
|
||||
creatorId?: string
|
||||
tag?: string
|
||||
|
@ -60,7 +61,9 @@ export function ContractSearch(props: {
|
|||
? initialSort
|
||||
: querySortOptions?.defaultSort
|
||||
|
||||
const [filter, setFilter] = useState<filter>('open')
|
||||
const [filter, setFilter] = useState<filter>(
|
||||
querySortOptions?.defaultFilter ?? 'open'
|
||||
)
|
||||
|
||||
if (!sort) return <></>
|
||||
return (
|
||||
|
|
|
@ -59,6 +59,7 @@ export function CreatorContractsList(props: { creator: User }) {
|
|||
creatorId: creator.id,
|
||||
},
|
||||
defaultSort: 'newest',
|
||||
defaultFilter: 'all',
|
||||
shouldLoadFromStorage: false,
|
||||
}}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue
Block a user