panel 2 courrier estore

This commit is contained in:
alma 2025-04-25 10:32:34 +02:00
parent b8e79ad2e7
commit ddcbc8821d
2 changed files with 24 additions and 3 deletions

View File

@ -1380,6 +1380,27 @@ export default function CourrierPage() {
); );
}; };
const searchEmails = (query: string) => {
setSearchQuery(query.trim());
};
const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const query = e.target.value;
setSearchQuery(query);
};
const renderEmailPreview = (email: Email) => {
if (!email) return null;
return (
<div className="p-4">
<h2 className="text-lg font-semibold mb-2">{email.subject}</h2>
<div className="text-sm text-gray-600">
{renderEmailContent(email)}
</div>
</div>
);
};
if (error) { if (error) {
return ( return (
<div className="flex h-[calc(100vh-theme(spacing.12))] items-center justify-center bg-gray-100 mt-12"> <div className="flex h-[calc(100vh-theme(spacing.12))] items-center justify-center bg-gray-100 mt-12">

View File

@ -90,8 +90,8 @@ export default function ComposeEmail({
try { try {
const emailToProcess = replyTo || forwardFrom; const emailToProcess = replyTo || forwardFrom;
if (!emailToProcess?.body) { if (!emailToProcess?.content) {
console.error('No email body found to process'); console.error('No email content found to process');
return; return;
} }
@ -109,7 +109,7 @@ export default function ComposeEmail({
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
}, },
body: JSON.stringify({ email: emailToProcess.body }), body: JSON.stringify({ email: emailToProcess.content }),
}); });
const data = await response.json(); const data = await response.json();