fix: resetting pages when filter changes

This commit is contained in:
Chubby Granny Chaser 2024-12-23 19:06:10 +00:00
parent aaecd203e1
commit f738f91f24
No known key found for this signature in database

View File

@ -103,6 +103,10 @@ export default function Catalogue() {
}));
}, [steamGenresMapping, filters.genres]);
useEffect(() => {
setPage(1);
}, [filters]);
const steamUserTagsFilterItems = useMemo(() => {
if (!steamUserTags[language]) return [];
@ -276,7 +280,7 @@ export default function Catalogue() {
baseColor={vars.color.darkBackground}
highlightColor={vars.color.background}
>
{Array.from({ length: 24 }).map((_, i) => (
{Array.from({ length: PAGE_SIZE }).map((_, i) => (
<Skeleton
key={i}
style={{