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: {
|
export function ContractSearch(props: {
|
||||||
querySortOptions?: {
|
querySortOptions?: {
|
||||||
defaultSort: Sort
|
defaultSort: Sort
|
||||||
|
defaultFilter?: filter
|
||||||
filter?: {
|
filter?: {
|
||||||
creatorId?: string
|
creatorId?: string
|
||||||
tag?: string
|
tag?: string
|
||||||
|
@ -60,7 +61,9 @@ export function ContractSearch(props: {
|
||||||
? initialSort
|
? initialSort
|
||||||
: querySortOptions?.defaultSort
|
: querySortOptions?.defaultSort
|
||||||
|
|
||||||
const [filter, setFilter] = useState<filter>('open')
|
const [filter, setFilter] = useState<filter>(
|
||||||
|
querySortOptions?.defaultFilter ?? 'open'
|
||||||
|
)
|
||||||
|
|
||||||
if (!sort) return <></>
|
if (!sort) return <></>
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -59,6 +59,7 @@ export function CreatorContractsList(props: { creator: User }) {
|
||||||
creatorId: creator.id,
|
creatorId: creator.id,
|
||||||
},
|
},
|
||||||
defaultSort: 'newest',
|
defaultSort: 'newest',
|
||||||
|
defaultFilter: 'all',
|
||||||
shouldLoadFromStorage: false,
|
shouldLoadFromStorage: false,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user