bug fixed
This commit is contained in:
@@ -54,6 +54,10 @@ const AllProducts = () => {
|
|||||||
router.push(`${pathname}?${params.toString()}`);
|
router.push(`${pathname}?${params.toString()}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
|
}, [page]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="custom-container p-4 mb-5 flex flex-col min-h-[calc(85vh)]">
|
<div className="custom-container p-4 mb-5 flex flex-col min-h-[calc(85vh)]">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
|
|||||||
@@ -60,11 +60,13 @@ const Product = () => {
|
|||||||
const params = new URLSearchParams(searchParams.toString());
|
const params = new URLSearchParams(searchParams.toString());
|
||||||
params.set('page', newPage.toString());
|
params.set('page', newPage.toString());
|
||||||
|
|
||||||
router.push(`${pathname}?${params.toString()}`, {
|
router.push(`${pathname}?${params.toString()}`);
|
||||||
scroll: true,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
|
}, [page]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="custom-container p-4 mb-5 flex flex-col min-h-[85vh]">
|
<div className="custom-container p-4 mb-5 flex flex-col min-h-[85vh]">
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user