Merge branch 'main' of https://github.com/VividTruthKeeper/hhm-client
This commit is contained in:
commit
1f9cba7088
|
|
@ -9,6 +9,7 @@ interface IProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Pagination = ({ pages, activePage, setActivePage }: IProps) => {
|
const Pagination = ({ pages, activePage, setActivePage }: IProps) => {
|
||||||
|
console.log(pages, activePage + 1);
|
||||||
const handleOnClick = (page: number) => {
|
const handleOnClick = (page: number) => {
|
||||||
setActivePage(page);
|
setActivePage(page);
|
||||||
};
|
};
|
||||||
|
|
@ -26,7 +27,7 @@ const Pagination = ({ pages, activePage, setActivePage }: IProps) => {
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={activePage + 1 > pages}
|
disabled={activePage + 1 >= pages}
|
||||||
onClick={() => handleOnClick(activePage + 1)}
|
onClick={() => handleOnClick(activePage + 1)}
|
||||||
>
|
>
|
||||||
<Arr className="pagination-arr pagination-arr-right" />
|
<Arr className="pagination-arr pagination-arr-right" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue