import { Head, Link } from '@inertiajs/react'; import { Inbox, MessageSquare, Shield, User } from 'lucide-react'; import { cn } from '@/lib/utils'; import { index as adminSupportIndex, show as showAdminSupport, } from '@/routes/admin/support'; import type { SupportConversationSummary } from '@/types'; type Props = { stats: { open: number; closed: number; }; conversations: SupportConversationSummary[]; }; export default function AdminSupportIndex({ stats, conversations }: Props) { return ( <>

Support inbox

Contact threads from users and channel request notes.

Conversations

{conversations.length} rows
{conversations.map((conversation) => (
{conversation.category_label}
{conversation.subject}
{conversation.user?.name} -{' '} {conversation.user?.email}
{conversation.latest_message && (

{ conversation.latest_message .author.name } : {conversation.latest_message.body}

)}
{conversation.messages_count}
))} {conversations.length === 0 && (
No support conversations found.
)}
); } AdminSupportIndex.layout = { breadcrumbs: [ { title: 'Support inbox', href: adminSupportIndex(), }, ], }; function Stat({ label, value }: { label: string; value: number }) { return (
{label}{' '} {value}
); } function StatusBadge({ status }: { status: 'open' | 'closed' }) { return ( {status === 'open' ? 'OPEN' : 'CLOSED'} ); }