mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-08 23:59:40 +00:00
Fix Download page not refetching on page change
This commit is contained in:
@@ -80,7 +80,11 @@ const Base = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentPageFromUrl !== currentPage) {
|
if (currentPageFromUrl !== currentPage) {
|
||||||
setSearchParams(params => {
|
setSearchParams(params => {
|
||||||
params.set('page', currentPage.toString());
|
if (currentPage == 0) {
|
||||||
|
params.delete('page');
|
||||||
|
} else {
|
||||||
|
params.set('page', currentPage.toString());
|
||||||
|
}
|
||||||
|
|
||||||
return params;
|
return params;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -117,7 +117,11 @@ const Download = () => {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [refresh, showIgnored, currentPage]);
|
}, [refresh]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setRefresh(true);
|
||||||
|
}, [channelFilterFromUrl, currentPage, showIgnored]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
@@ -127,10 +131,6 @@ const Download = () => {
|
|||||||
})();
|
})();
|
||||||
}, [lastVideoCount, showIgnored]);
|
}, [lastVideoCount, showIgnored]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setRefresh(true);
|
|
||||||
}, [channelFilterFromUrl]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<title>TA | Downloads</title>
|
<title>TA | Downloads</title>
|
||||||
@@ -262,7 +262,7 @@ const Download = () => {
|
|||||||
|
|
||||||
const params = searchParams;
|
const params = searchParams;
|
||||||
if (value !== 'all') {
|
if (value !== 'all') {
|
||||||
params.append('channel', value);
|
params.set('channel', value);
|
||||||
} else {
|
} else {
|
||||||
params.delete('channel');
|
params.delete('channel');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user