Refactor API Parameter Handling and Update Email Transport
✅ Updated API Route Parameters: - Changed parameter type from `{ id: string }` to `Promise<{ id: string }>` in PUT and DELETE methods for better async handling. ✅ Fixed Email Transport Creation: - Updated `nodemailer.createTransporter` to `nodemailer.createTransport` for correct transport configuration. ✅ Refactored AnalyticsDashboard Component: - Changed export from default to named export for better modularity. ✅ Enhanced Email Responder Toast: - Updated toast structure to include additional properties for better user feedback. 🎯 Overall Improvements: - Improved async handling in API routes. - Ensured correct usage of nodemailer. - Enhanced component exports and user notifications.
This commit is contained in:
@@ -224,9 +224,14 @@ export const EmailResponder: React.FC<EmailResponderProps> = ({
|
||||
{/* Toast */}
|
||||
{showToast && (
|
||||
<Toast
|
||||
message={toastMessage}
|
||||
type={toastType}
|
||||
onClose={() => setShowToast(false)}
|
||||
toast={{
|
||||
id: 'email-toast',
|
||||
type: toastType,
|
||||
title: toastType === 'success' ? 'E-Mail gesendet!' : 'Fehler!',
|
||||
message: toastMessage,
|
||||
duration: 5000
|
||||
}}
|
||||
onRemove={() => setShowToast(false)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user