Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pouyio committed Nov 6, 2024
1 parent 9360b40 commit 2947339
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ const Pagination: React.FC<IPaginationProps> = ({

useEffect(() => {
if (onFilter && selectedGenres) {
setFirst();
onFilter(selectedGenres);
}
}, [selectedGenres]);
}, [searchParams.get('genres')]);

const setToggleFilters = () => {
if (showFilters) {
Expand Down Expand Up @@ -96,7 +97,7 @@ const Pagination: React.FC<IPaginationProps> = ({
</div>
{showFilters && onFilter && (
<div className="sticky top-0">
<div className="inline-flex bg-blue-100 py-2 px-4 w-full flex-col border-b-2">
<div className="inline-flex bg-blue-100 px-4 w-full flex-col border-b-2">
<Genres onClick={toggleGenre} selected={selectedGenres} />
</div>
</div>
Expand Down

0 comments on commit 2947339

Please sign in to comment.