diff --git a/src/pages/dashboard/Content/Support/TicketList.tsx b/src/pages/dashboard/Content/Support/TicketList.tsx index e20f5c2..e968d60 100644 --- a/src/pages/dashboard/Content/Support/TicketList.tsx +++ b/src/pages/dashboard/Content/Support/TicketList.tsx @@ -81,7 +81,7 @@ export default function TicketList() { const scrollBottom = ticketsBox.scrollHeight - ticketsBox.scrollTop - ticketsBox.clientHeight; if ( scrollBottom < ticketsBox.scrollHeight * 0.5 && - isFetchingTicketsRef.current !== "all fetched" + isFetchingTicketsRef.current === "idle" ) setCurrentPage(prev => prev + 1); }; @@ -93,6 +93,10 @@ export default function TicketList() { }; }, []); + useEffect(() => { + console.log("currentPage:", currentPage); + }, [currentPage]); + const sortedTickets = tickets.sort(sortTicketsByUpdateTime).sort(sortTicketsByUnread); return ( @@ -156,6 +160,7 @@ export default function TicketList() { overflow: "auto", overflowY: "auto", padding: "10px", + height: "100px", }} > {sortedTickets.map(ticket =>