courrier multi account restore compose
This commit is contained in:
parent
9ba2190912
commit
6e0d9ea262
@ -8,7 +8,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Email } from '@/hooks/use-courrier';
|
||||
|
||||
interface EmailDetailViewProps {
|
||||
email: Email;
|
||||
email: Email & { html?: string; text?: string };
|
||||
onBack: () => void;
|
||||
onReply: () => void;
|
||||
onReplyAll: () => void;
|
||||
@ -40,8 +40,8 @@ export default function EmailDetailView({
|
||||
// Render email content based on the email body
|
||||
const renderEmailContent = () => {
|
||||
try {
|
||||
// For simple rendering in this example, we'll just display the content directly
|
||||
return <div dangerouslySetInnerHTML={{ __html: email.content || '' }} />;
|
||||
// Use fallback for content, html, or text
|
||||
return <div dangerouslySetInnerHTML={{ __html: email.content || email.html || email.text || '' }} />;
|
||||
} catch (e) {
|
||||
console.error('Error rendering email:', e);
|
||||
return <div className="text-gray-500">Failed to render email content</div>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user