diff --git a/hooks/use-courrier.ts b/hooks/use-courrier.ts index 0821e080..2dc2a818 100644 --- a/hooks/use-courrier.ts +++ b/hooks/use-courrier.ts @@ -110,9 +110,9 @@ export const useCourrier = () => { // Try to get cached emails first const currentRequestPage = page; - // CRITICAL FIX: Use the correct parameter order - // Signature is: (userId: string, folder: string, page: number, perPage: number, timeoutMs: number = 100, accountId?: string) - console.log(`Getting cached emails for ${currentFolder} with accountId ${accountId || 'default'}`); + // FIXED: Use the correct parameter order for getCachedEmailsWithTimeout + // Function signature: (userId: string, folder: string, page: number, perPage: number, timeoutMs: number = 100, accountId?: string) + console.log(`Getting cached emails for user ${session.user.id}, folder ${currentFolder}, page ${currentRequestPage}, accountId ${accountId || 'default'}`); const cachedEmails = await getCachedEmailsWithTimeout( session.user.id, // userId: string currentFolder, // folder: string