Skip to content

Commit

Permalink
Merge pull request #995 from ita-social-projects/#985-Admin]-Paginati…
Browse files Browse the repository at this point in the history
…on-for-Users-List

move the pagination block to the center of the page
  • Loading branch information
Andrewakiv authored Dec 3, 2024
2 parents c4ed6c0 + 0832ef4 commit 2fca8d1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 12 additions & 2 deletions FrontEnd/src/pages/AdminPage/UserProfilesTable/UserTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import css from './UserTable.module.scss';


const LENGTH_EMAIL = 14;
const DEFAULT_PAGE_SIZE = 20;
const DEFAULT_PAGE_SIZE = 10;

function UserTable() {
const location = useLocation();
Expand Down Expand Up @@ -244,12 +244,12 @@ function UserTable() {
return (
<div className={css['table-container']}>
<Pagination
showSizeChanger
current={currentPage}
pageSize={pageSize}
total={totalItems}
onChange={handlePageChange}
onShowSizeChange={handlePageChange}
showSizeChanger={false}
showTitle={false}
className={css['pagination']}
/>
Expand All @@ -266,6 +266,16 @@ function UserTable() {
cancelSort: 'Відмінити сортування',
}}
/>
<Pagination
showSizeChanger
current={currentPage}
pageSize={pageSize}
total={totalItems}
onChange={handlePageChange}
onShowSizeChange={handlePageChange}
showTitle={false}
className={css['pagination']}
/>
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
.pagination {
margin-top: 16px;
text-align: center;
justify-content: center;
margin-bottom: 16px;
}

Expand Down
3 changes: 3 additions & 0 deletions FrontEnd/src/routes/AdminRouter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ function AdminRouter() {
filterReset: 'Скинути',
filterConfirm: 'Застосувати',
},
Pagination: {
items_per_page: '/ сторінка'
}
}}
>
<BurgerMenuProvider>
Expand Down

0 comments on commit 2fca8d1

Please sign in to comment.