Compare commits

..

2 Commits

Author SHA1 Message Date
Олег Водянов
b3b4f72193
Merge pull request #18 from olegvodyanov/add_pagination
All checks were successful
continuous-integration/drone/push Build is passing
fix
2025-04-23 10:48:28 +04:00
oleg.vodyanov91@gmail.com
37ab5965ed fix 2025-04-23 10:47:58 +04:00

View File

@ -3,10 +3,9 @@ const addLinkBtn = document.getElementById('addLinkBtn');
const newLinksContainer = document.getElementById('newLinksContainer'); const newLinksContainer = document.getElementById('newLinksContainer');
const watchedLinksContainer = document.getElementById('watchedLinksContainer'); const watchedLinksContainer = document.getElementById('watchedLinksContainer');
const PER_PAGE = 8;
let currentPage = 1;
function loadLinks() { function loadLinks() {
const PER_PAGE = 8;
let currentPage = 1;
fetch(`/api/links/?page=${currentPage}&per_page=${PER_PAGE}`) fetch(`/api/links/?page=${currentPage}&per_page=${PER_PAGE}`)
.then(res => res.json()) .then(res => res.json())
.then(data => { .then(data => {