Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Bartosik committed Jul 5, 2021
1 parent acf9ac8 commit 8382fee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/CountriesList/CountriesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const CountriesList: React.FC = () => {
window.scrollTo(0, 0);
}, [currentPage]);

const handlePageClick = ({ selected }: any): void => {
setCurrentPage(selected);
};

if (!filteredCountries.length) {
return <Notification>No results found</Notification>;
}
Expand All @@ -28,10 +32,6 @@ const CountriesList: React.FC = () => {
);
const pageCount = Math.ceil(filteredCountries.length / Pagination.PageSize);

const handlePageClick = ({ selected }: any): void => {
setCurrentPage(selected);
};

return (
<>
<Wrapper>
Expand Down

0 comments on commit 8382fee

Please sign in to comment.