reset page on filter change (lost in rebase)
This commit is contained in:
parent
bb23776554
commit
b7b5104ba8
1 changed files with 4 additions and 0 deletions
|
@ -148,14 +148,18 @@ function ClaimListDiscover(props: Props) {
|
|||
if (newTypeSort === TYPE_TOP) {
|
||||
url += `&time=${timeSort}`;
|
||||
}
|
||||
|
||||
setPage(1);
|
||||
history.push(url);
|
||||
}
|
||||
|
||||
function handlePersonalSort(newPersonalSort) {
|
||||
setPage(1);
|
||||
history.push(`${getSearch()}type=${typeSort}&sort=${newPersonalSort}`);
|
||||
}
|
||||
|
||||
function handleTimeSort(newTimeSort) {
|
||||
setPage(1);
|
||||
history.push(`${getSearch()}type=${typeSort}&sort=${personalSort}&time=${newTimeSort}`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue