panel 2 courrier estore
This commit is contained in:
parent
b8e79ad2e7
commit
ddcbc8821d
@ -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) {
|
||||
return (
|
||||
<div className="flex h-[calc(100vh-theme(spacing.12))] items-center justify-center bg-gray-100 mt-12">
|
||||
|
||||
@ -90,8 +90,8 @@ export default function ComposeEmail({
|
||||
|
||||
try {
|
||||
const emailToProcess = replyTo || forwardFrom;
|
||||
if (!emailToProcess?.body) {
|
||||
console.error('No email body found to process');
|
||||
if (!emailToProcess?.content) {
|
||||
console.error('No email content found to process');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ export default function ComposeEmail({
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ email: emailToProcess.body }),
|
||||
body: JSON.stringify({ email: emailToProcess.content }),
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user