diff --git a/app/mail/page.tsx b/app/mail/page.tsx index f515192..730de5a 100644 --- a/app/mail/page.tsx +++ b/app/mail/page.tsx @@ -451,6 +451,7 @@ export default function MailPage() { const [itemToDelete, setItemToDelete] = useState(null); const [showCc, setShowCc] = useState(false); const [contentLoading, setContentLoading] = useState(false); + const [attachments, setAttachments] = useState([]); // Move getSelectedEmail inside the component const getSelectedEmail = () => { @@ -692,6 +693,12 @@ export default function MailPage() { } }; + const handleFileAttachment = (e: React.ChangeEvent) => { + if (e.target.files) { + setAttachments(Array.from(e.target.files)); + } + }; + if (error) { return (
@@ -1107,13 +1114,13 @@ export default function MailPage() {
{/* To Field */}
- + setComposeTo(e.target.value)} placeholder="recipient@example.com" - className="w-full mt-1 bg-white border-gray-300" + className="w-full mt-1 bg-white border-gray-300 text-gray-900" />
@@ -1138,13 +1145,13 @@ export default function MailPage() { {/* CC Field */} {showCc && (
- + setComposeCc(e.target.value)} placeholder="cc@example.com" - className="w-full mt-1 bg-white border-gray-300" + className="w-full mt-1 bg-white border-gray-300 text-gray-900" />
)} @@ -1152,38 +1159,38 @@ export default function MailPage() { {/* BCC Field */} {showBcc && (
- + setComposeBcc(e.target.value)} placeholder="bcc@example.com" - className="w-full mt-1 bg-white border-gray-300" + className="w-full mt-1 bg-white border-gray-300 text-gray-900" />
)} {/* Subject Field */}
- + setComposeSubject(e.target.value)} placeholder="Enter subject" - className="w-full mt-1 bg-white border-gray-300" + className="w-full mt-1 bg-white border-gray-300 text-gray-900" />
{/* Message Body */}
- +