Skip to content

Commit

Permalink
dynamic url
Browse files Browse the repository at this point in the history
  • Loading branch information
php-team-mindspace committed Nov 12, 2024
1 parent cc3d1dd commit 64ab2d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/webapp/src/pages/bootcamps/BootcampsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ const BootcampsPage = () => {
}
};
fetchBootcamps();

// Update the URL
const url = new URL(window.location.href);
url.searchParams.set('page', currentPage);
url.searchParams.set('limit', itemsPerPage);
window.history.pushState({}, '', url.toString());
}, [currentPage]);

const handlePaginationChange = (selectedPage) => {
Expand Down

0 comments on commit 64ab2d6

Please sign in to comment.