diff --git a/apps/mail/components/mail/mail-display.tsx b/apps/mail/components/mail/mail-display.tsx index a91040c59e..9937830cf5 100644 --- a/apps/mail/components/mail/mail-display.tsx +++ b/apps/mail/components/mail/mail-display.tsx @@ -37,6 +37,7 @@ import { memo, useEffect, useMemo, useState, useRef, useCallback } from 'react'; import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover'; import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'; import { Avatar, AvatarFallback, AvatarImage } from '../ui/avatar'; +import type { Sender, ParsedMessage, Attachment } from '@/types'; import { useActiveConnection } from '@/hooks/use-connections'; import { handleUnsubscribe } from '@/lib/email-utils.client'; import { getListUnsubscribeAction } from '@/lib/email-utils'; @@ -44,7 +45,6 @@ import AttachmentsAccordion from './attachments-accordion'; import { cn, getEmailLogo, formatDate } from '@/lib/utils'; import { useBrainState } from '../../hooks/use-summary'; import { useThreadLabels } from '@/hooks/use-labels'; -import type { Sender, ParsedMessage, Attachment } from '@/types'; import { Markdown } from '@react-email/components'; import AttachmentDialog from './attachment-dialog'; import { useSummary } from '@/hooks/use-summary'; @@ -226,7 +226,6 @@ const MailDisplayLabels = ({ labels }: { labels: string[] }) => { > {icon} - {label} @@ -289,14 +288,16 @@ const ThreadAttachments = ({ attachments }: { attachments: Attachment[] }) => { return ( - Thread Attachments [{attachments.length}] + + Thread Attachments [{attachments.length}] + {attachments.map((attachment) => ( handleDownload(attachment)} - className="flex items-center gap-2 rounded-md px-2 py-1 text-sm hover:bg-[#F0F0F0] dark:bg-[#262626] dark:hover:bg-[#303030] cursor-pointer" + className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-sm hover:bg-[#F0F0F0] dark:bg-[#262626] dark:hover:bg-[#303030]" > {getFileIcon(attachment.filename)} @@ -1037,8 +1038,7 @@ const MailDisplay = ({ emailData, index, totalEmails, demo, threadAttachments }: - - + {emailData?.tags?.length ? ( t.name) || []} /> @@ -1403,7 +1403,7 @@ const MailDisplay = ({ emailData, index, totalEmails, demo, threadAttachments }: {emailData?.attachments.map((attachment, index) => ( openAttachment(attachment)} > {getFileIcon(attachment.filename)}
{label}