Fix: update deprecated button group (daisy ui) to join

This commit is contained in:
Aaron William Po
2023-06-02 19:51:26 -04:00
parent 02d753fb41
commit b97228cfa1
3 changed files with 9 additions and 41 deletions

View File

@@ -1,32 +0,0 @@
import Link from 'next/link';
import { FaArrowLeft, FaArrowRight } from 'react-icons/fa';
import { FC } from 'react';
interface PaginationProps {
pageNum: number;
pageCount: number;
}
const BeerIndexPaginationBar: FC<PaginationProps> = ({ pageCount, pageNum }) => {
return (
<div className="btn-group">
<Link
className={`btn ${pageNum === 1 ? 'btn-disabled' : ''}`}
href={{ pathname: '/beers', query: { page_num: pageNum - 1 } }}
scroll={false}
>
<FaArrowLeft />
</Link>
<button className="btn">Page {pageNum}</button>
<Link
className={`btn ${pageNum === pageCount ? 'btn-disabled' : ''}`}
href={{ pathname: '/beers', query: { page_num: pageNum + 1 } }}
scroll={false}
>
<FaArrowRight />
</Link>
</div>
);
};
export default BeerIndexPaginationBar;