diff --git a/apps/web/src/app/[orgShortcode]/convo/[convoId]/_components/messages-panel.tsx b/apps/web/src/app/[orgShortcode]/convo/[convoId]/_components/messages-panel.tsx index a39eb82e..431b2d0a 100644 --- a/apps/web/src/app/[orgShortcode]/convo/[convoId]/_components/messages-panel.tsx +++ b/apps/web/src/app/[orgShortcode]/convo/[convoId]/_components/messages-panel.tsx @@ -21,6 +21,7 @@ import { TooltipContent } from '@/src/components/shadcn-ui/tooltip'; import { type JSONContent, generateHTML } from '@u22n/tiptap/react'; +import { SmartDateTime } from '@/src/components/smart-date-time'; import { emailIdentityAtom, replyToMessageAtom } from '../atoms'; import { Virtuoso, type VirtuosoHandle } from 'react-virtuoso'; import { OriginalMessageView } from './original-message-view'; @@ -28,7 +29,6 @@ import { type RouterOutputs, platform } from '@/src/lib/trpc'; import { createExtensionSet } from '@u22n/tiptap/extensions'; import { useOrgShortcode } from '@/src/hooks/use-params'; import { type formatParticipantData } from '../../utils'; -import { useTimeAgo } from '@/src/hooks/use-time-ago'; import { cn, copyToClipboard } from '@/src/lib/utils'; import { Avatar } from '@/src/components/avatar'; import { type TypeId } from '@u22n/utils/typeid'; @@ -239,7 +239,6 @@ const MessageItem = memo( // if the message timestamp is less than a day ago, show the date instead of the time const isRecent = new Date().getTime() - message.createdAt.getTime() < ms('1 day'); - const timeAgo = useTimeAgo(message.createdAt); const viaAddress = message.metadata?.email?.from?.[0]?.email; @@ -328,7 +327,7 @@ const MessageItem = memo(