import React from 'react'; import { format } from 'date-fns'; interface Mail { id: string; name: string; subject: string; email: string; date: string; text: string; read?: boolean; labels?: string[]; } interface MailDisplayProps { mail: Mail | null; } export function MailDisplay({ mail }: MailDisplayProps) { if (!mail) { return (

No message selected

); } return (
{mail.name[0]}

{mail.name}

{mail.subject}

Reply-To: {mail.email}

{format(new Date(mail.date), 'MMM d, yyyy, h:mm a')}

{mail.text}