diff --git a/src/pages/primary/DiscussionsPage/ThreadCard.tsx b/src/pages/primary/DiscussionsPage/ThreadCard.tsx index a144102..ae62366 100644 --- a/src/pages/primary/DiscussionsPage/ThreadCard.tsx +++ b/src/pages/primary/DiscussionsPage/ThreadCard.tsx @@ -5,7 +5,6 @@ import { NostrEvent } from 'nostr-tools' import { formatDistanceToNow } from 'date-fns' import { useTranslation } from 'react-i18next' import { cn } from '@/lib/utils' -import { truncateText } from '@/lib/utils' import { DISCUSSION_TOPICS } from './CreateThreadDialog' import Username from '@/components/Username' import UserAvatar from '@/components/UserAvatar' @@ -34,8 +33,10 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC const topicTag = thread.tags.find(tag => tag[0] === 't' && tag[1]) const topic = topicTag?.[1] || 'general' - // Get first 250 words of content - const contentPreview = truncateText(thread.content, 250) + // Get first 250 characters of content + const contentPreview = thread.content.length > 250 + ? thread.content.substring(0, 250) + '...' + : thread.content // Format creation time const createdAt = new Date(thread.created_at * 1000) @@ -75,7 +76,7 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC
-

+

{title}

@@ -113,7 +114,7 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC
-

+

{title}

{thread._relaySource && ( @@ -148,7 +149,7 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC -
+
{contentPreview}