diff --git a/web/src/components/home-card.tsx b/web/src/components/home-card.tsx index fa72fb9342..3bbab828ec 100644 --- a/web/src/components/home-card.tsx +++ b/web/src/components/home-card.tsx @@ -1,12 +1,8 @@ import { RAGFlowAvatar } from '@/components/ragflow-avatar'; +import { TruncatedText } from '@/components/truncated-text'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -import { - Tooltip, - TooltipContent, - TooltipTrigger, -} from '@/components/ui/tooltip'; import { formatDate } from '@/utils/date'; -import { ElementType, ReactNode, useRef, useState } from 'react'; +import { ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; interface IProps { @@ -30,48 +26,6 @@ function Time({ time }: { time: string | number | undefined }) { return
{formatDate(time)}
; } -function TruncatedText({ - as: Tag = 'div', - className, - children, - tooltip, - testId, -}: { - as?: ElementType; - className?: string; - children?: ReactNode; - tooltip?: ReactNode; - testId?: string; -}) { - const ref = useRef
+