courrier formatting
This commit is contained in:
parent
65b1061088
commit
2b017a9395
@ -714,9 +714,7 @@ export default function CourrierPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center">
|
||||
{/* Buttons removed from here to avoid duplication with the BulkActionsToolbar */}
|
||||
</div>
|
||||
{/* Buttons removed from here to avoid duplication with the BulkActionsToolbar */}
|
||||
</div>
|
||||
|
||||
{/* Email List - Always visible */}
|
||||
@ -743,7 +741,23 @@ export default function CourrierPage() {
|
||||
) : (
|
||||
<div className="h-full overflow-hidden flex flex-col">
|
||||
{/* Email List */}
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
<div
|
||||
className="flex-1 overflow-y-auto"
|
||||
onScroll={(e) => {
|
||||
const target = e.currentTarget;
|
||||
const { scrollTop, scrollHeight, clientHeight } = target;
|
||||
const distanceToBottom = scrollHeight - scrollTop - clientHeight;
|
||||
const scrollPercentage = (scrollTop + clientHeight) / scrollHeight;
|
||||
|
||||
console.log(`[DEBUG-WRAPPER-SCROLL] Distance to bottom: ${distanceToBottom}px, percentage: ${Math.round(scrollPercentage * 100)}%, hasMoreEmails: ${page < totalPages}, isLoading: ${isLoading}`);
|
||||
|
||||
// If near bottom and not already loading and has more emails
|
||||
if (distanceToBottom < 300 && !isLoading && page < totalPages) {
|
||||
console.log(`[DEBUG-WRAPPER-TRIGGER] Calling handleLoadMore from wrapper`);
|
||||
handleLoadMore();
|
||||
}
|
||||
}}
|
||||
>
|
||||
{emails.length === 0 ? (
|
||||
<div className="h-full flex items-center justify-center">
|
||||
<div className="text-center p-6">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user