Skip to content

Commit

Permalink
Create pagination component and add it to BootcampsPage
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadhonrao committed Oct 7, 2024
1 parent e9d10ba commit 97899e2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 29 deletions.
35 changes: 35 additions & 0 deletions ui/src/components/Pagination.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Pagination = () => {
return (
<nav aria-label="Page navigation example">
<ul className="pagination">
<li className="page-item">
<a className="page-link" href="/">
Previous
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
1
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
2
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
3
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
Next
</a>
</li>
</ul>
</nav>
);
};

export default Pagination;
31 changes: 2 additions & 29 deletions ui/src/pages/bootcamps/BootcampsPage.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Bootcamp from '../../components/Bootcamp';
import Pagination from '../../components/Pagination';

const bootcamps = [
{
Expand Down Expand Up @@ -104,35 +105,7 @@ const BootcampsPage = () => {
))}

{/* <!-- Pagination --> */}
<nav aria-label="Page navigation example">
<ul className="pagination">
<li className="page-item">
<a className="page-link" href="/">
Previous
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
1
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
2
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
3
</a>
</li>
<li className="page-item">
<a className="page-link" href="/">
Next
</a>
</li>
</ul>
</nav>
<Pagination />
</div>
</div>
</div>
Expand Down

0 comments on commit 97899e2

Please sign in to comment.