// ============================================================ // MOORE AI v13 — INBOX TAB // Requires: shared/utils.js, shared/components.jsx loaded first // ============================================================ const InboxView = ({ conversations, loadingTabs, fetchConversations }) => { const { useState } = React; const [selected, setSelected] = useState(null); return (
{/* Conversation List */}
Inbox
{loadingTabs.inbox ? (
) : conversations.length === 0 ? (
No conversations
) : conversations.map(c => (
setSelected(c)} className={`flex items-start gap-3 px-5 py-4 cursor-pointer border-b border-slate-800/30 transition-colors ${selected?.id === c.id ? 'bg-blue-600/10 border-l-2 border-blue-500' : 'hover:bg-slate-800/20'}`}>
{c.contactName}
{c.unreadCount > 0 && ( {c.unreadCount} )}
{c.lastMessage || 'No messages'}
{fmtDate(c.lastMessageDate)}
))}
{/* Message Thread */}
{selected ? (
{selected.contactName}
Last: {selected.lastMessage}
Use Jake AI to compose and send messages
) : (
Select a conversation
)}
); };