reset page on filter change (lost in rebase)

This commit is contained in:
Sean Yesmunt 2019-09-19 16:25:44 -04:00
parent bb23776554
commit b7b5104ba8

View file

@ -148,14 +148,18 @@ function ClaimListDiscover(props: Props) {
if (newTypeSort === TYPE_TOP) { if (newTypeSort === TYPE_TOP) {
url += `&time=${timeSort}`; url += `&time=${timeSort}`;
} }
setPage(1);
history.push(url); history.push(url);
} }
function handlePersonalSort(newPersonalSort) { function handlePersonalSort(newPersonalSort) {
setPage(1);
history.push(`${getSearch()}type=${typeSort}&sort=${newPersonalSort}`); history.push(`${getSearch()}type=${typeSort}&sort=${newPersonalSort}`);
} }
function handleTimeSort(newTimeSort) { function handleTimeSort(newTimeSort) {
setPage(1);
history.push(`${getSearch()}type=${typeSort}&sort=${personalSort}&time=${newTimeSort}`); history.push(`${getSearch()}type=${typeSort}&sort=${personalSort}&time=${newTimeSort}`);
} }