diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx
index 71d002f5..8f105caa 100644
--- a/app/courrier/page.tsx
+++ b/app/courrier/page.tsx
@@ -9,7 +9,7 @@ import {
Inbox, Send, Star, Trash, Plus, ChevronLeft, ChevronRight,
Search, ChevronDown, Folder, ChevronUp, Reply, Forward, ReplyAll,
MoreHorizontal, FolderOpen, X, Paperclip, MessageSquare, Copy, EyeOff,
- AlertOctagon, Archive, RefreshCw
+ AlertOctagon, Archive, RefreshCw, Menu
} from 'lucide-react';
import { Dialog, DialogContent } from '@/components/ui/dialog';
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
@@ -159,6 +159,18 @@ export default function CourrierPage() {
}
}, [selectedAccount]);
+ // Add useEffect for debugging
+ useEffect(() => {
+ if (typeof window !== 'undefined') {
+ console.log('[DEBUG] Rendering UI with:', {
+ accountsCount: accounts.length,
+ selectedAccountId: selectedAccount?.id,
+ showFolders,
+ currentFolder
+ });
+ }
+ }, [accounts, selectedAccount, showFolders, currentFolder]);
+
// Calculate unread count (this would be replaced with actual data in production)
useEffect(() => {
// Example: counting unread emails in the inbox
@@ -559,16 +571,6 @@ export default function CourrierPage() {
router.push('/courrier/login');
};
- // Add this log right before the return statement in the CourrierPage component
- // Debug accounts and selectedAccount before rendering
- useEffect(() => {
- console.log('=== RENDER STATE INSPECTION ===');
- console.log('Current accounts state:', accounts);
- console.log('Selected account:', selectedAccount);
- console.log('Current folder:', currentFolder);
- console.log('Show folders:', showFolders);
- }, [accounts, selectedAccount, currentFolder, showFolders]);
-
// Extra debugging for folder rendering
useEffect(() => {
if (selectedAccount && showFolders) {
@@ -580,17 +582,8 @@ export default function CourrierPage() {
}
}, [selectedAccount, showFolders]);
- // Add useEffect for debugging near the other useEffect hooks
- useEffect(() => {
- if (typeof window !== 'undefined') {
- console.log('[DEBUG] Rendering UI with:', {
- accountsCount: accounts.length,
- selectedAccountId: selectedAccount?.id,
- showFolders,
- currentFolder
- });
- }
- })}
+ return (
+ <>
Loading emails...
+- Choose an email from the list or compose a new message to get started. -
- ++ {searchQuery + ? `No results found for "${searchQuery}"` + : `Your ${currentFolder.toLowerCase()} is empty`} +
+