This commit is contained in:
oleg.vodyanov91@gmail.com 2025-04-23 10:47:58 +04:00
parent 9303b3a6e6
commit 37ab5965ed

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 => {