pagination antd error

parent 55e56094
......@@ -6,10 +6,20 @@ import { MaterialSymbol } from 'react-material-symbols';
const Home = () => {
const navigate = useNavigate();
const handleAddClick = () => {
navigate("/add");
};
const handlePaginationChange = (page) => {
console.log("Current page:", page);
};
return (
<section className='section'>
<div className="add">
<Button href='/' icon={<MaterialSymbol icon='add_circle' size={20} color='#0E2B52' />} className='add_title'>Добавить</Button>
<Button icon={<MaterialSymbol icon='add_circle' size={20} color='#0E2B52' />} className='add_title' onClick={handleAddClick}>
Добавить
</Button>
</div>
<div className="data">
<table className="data-table">
......@@ -31,7 +41,7 @@ const Home = () => {
<td>050940002848</td>
<td>organization_code_1</td>
<td>ТОО “Рога и Копыта”</td>
<td>esutd-dev.arta.kz </td>
<td>esutd-dev.arta.kz</td>
<td>активен</td>
<td>
<button className="view-btn" onClick={() => navigate("/edit")}>
......@@ -84,10 +94,10 @@ const Home = () => {
</table>
</div>
<div className='pagination-container'>
<Pagination current={1} defaultCurrent={1} pageSize={1} total={10} />
<Pagination current={1} defaultCurrent={1} pageSize={1} total={10} onChange={handlePaginationChange} />
</div>
</section>
)
}
);
};
export default Home;
......@@ -6,6 +6,10 @@ import '../../src/styles/Home/requiestPage.css';
const dateFormat = 'YYYY/MM/DD';
const RequestPage: React.FC = () => {
const handlePaginationChange = (page) => {
console.log("Current page:", page);
};
return (
<div className='container' style={{minWidth: '1440px'}}>
<div className='filter' style={{margin: '20px 20px 10px', display: 'flex', alignItems: 'center', justifyContent: 'space-between'}}>
......@@ -109,7 +113,7 @@ const RequestPage: React.FC = () => {
</div> */}
<div className='pagination-container'>
<Pagination current={1} defaultCurrent={1} pageSize={1} total={10} />
<Pagination current={1} defaultCurrent={1} pageSize={1} total={10} onChange={handlePaginationChange} />
</div>
</div>
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment