Closed EjembiEmmanuel closed 6 days ago
Hi @EjembiEmmanuel I just reviewed your PR and I love it but there's this concern
A fix I suggest is to remove
bg-[#16181D]
from this line (line 71 on duels-lobby.tsx)
<tbody className="absolute h-[450px] w-[814px] overflow-y-scroll bg-[#16181D]">
For this, the issue seems to be this line (line 93 in duels-lobby.tsx)
const isLast = index === player_stats.length - 1;
player_stats is a static data set we created for testing purposes now you're fetching live data I advice you use
const isLast = index === data.length - 1;
instead, but this naming will cause an issue
{data ? data.map((data: any, index: number) => {
const isLast = index === data.length - 1;
const date = new Date(data.date)
Because to get the last item you need to know the size of the full array (data.length) but your code is naming the full array and an item of it "data" and isLast cannot reach the full array to calculate if the particular item is the last item, I suggest you rename the inner data to something else like item
Also implement isLast logic for the bottom border of your loading skeleton
The latest updates on your projects. Learn more about Vercel for Git ↗︎