diff --git a/src/components/molecules/leaderboard/index.tsx b/src/components/molecules/leaderboard/index.tsx index 77af764e..9cb055f0 100644 --- a/src/components/molecules/leaderboard/index.tsx +++ b/src/components/molecules/leaderboard/index.tsx @@ -25,7 +25,7 @@ const Leaderboard: React.FC = ({ userId, list, isLoading, onLoad }) => { const [pageNumber, setPageNumber] = useState(1); const maxUsers = list[0]?.ranking.total; - const maxPage = maxUsers / PAGE_SIZE; + const maxPage = Math.ceil(maxUsers / PAGE_SIZE); const onSort = (val: LeaderboardColumn) => { // if click on current column ? change direction : set default direction