Closed KendallDoesCoding closed 2 years ago
@TechStudent10 please let me know asap
The code base has changed so much I'm not sure if I'll be able to identify the source of the bug.
Okay I've identified the bug, but I can't fix it rn. Maybe later.
For anyone wondering, inside of you-may-like/index.js
, we have this:
function DisplayList(items, wrapper, rows_per_page, page) {
wrapper.innerHTML = "";
page--;
let start = rows_per_page * page;
let end = start + rows_per_page;
let paginatedItems = items.slice(start, end);
for (let i = 0; i < paginatedItems.length; i++) {
let item = paginatedItems[i];
let item_element = document.createElement("div");
item_element.classList.add("item");
item_element.innerText = item;
let link = links[i]
item_element.addEventListener("click", (e) => {
window.open(link, "_blank")
})
wrapper.appendChild(item_element);
}
}
This is what displays the list. The issue is that instead of adding the page number to i
when we search for the links, it always goes from the first index. In layman's terms: we are updating the contents of the list, but not the links themselves. If someone wants to give a crack at this, here you go. Otherwise I should be able to fix this later.
Let me know if it's available to work on. @KendallDoesCoding
It is, indeed!
On Sun, 4 Sept 2022 at 13:25, Vivek Sharma @.***> wrote:
Let me know if it's available to work on. @KendallDoesCoding https://github.com/KendallDoesCoding
— Reply to this email directly, view it on GitHub https://github.com/KendallDoesCoding/mogul-christmas/issues/314#issuecomment-1236282395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUGJUTNB2TMYIGDXIYBQJ43V4RIVRANCNFSM57XH2QWQ . You are receiving this because you were mentioned.Message ID: @.***>
Only 5 urls in the order of the first page got consted and only those 5 songs are playing no matter which button you tap on which page.
Issue starts from the 2-5th page.
PLEASE FIX AT THE EARLIEST @TechStudent10 AS THIS IS A MAJOR BUG