Browse Source

get rid of bottom bar

imwald
Silberengel 5 months ago
parent
commit
6cdfbe2a7e
  1. 65
      src/pages/primary/DiscussionsPage/ThreadCard.tsx

65
src/pages/primary/DiscussionsPage/ThreadCard.tsx

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
import { Card, CardContent, CardHeader } from '@/components/ui/card'
import { Button } from '@/components/ui/button'
import { Badge } from '@/components/ui/badge'
import { Clock, Hash, Server } from 'lucide-react'
import { NostrEvent } from 'nostr-tools'
@ -69,41 +68,34 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC @@ -69,41 +68,34 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC
onClick={onThreadClick}
>
<CardHeader className="pb-3">
<div className="flex items-start gap-3">
<VoteButtons event={thread} />
<div className="flex-1 min-w-0">
<div className="flex items-center gap-2 mb-2">
<h3 className="font-semibold text-lg leading-tight line-clamp-2">
{title}
</h3>
{thread._relaySource && (
<Badge variant="outline" className="text-xs shrink-0">
<Server className="w-3 h-3 mr-1" />
{formatRelayName(thread._relaySource)}
<div className="flex items-start justify-between gap-3">
<div className="flex items-start gap-3 flex-1 min-w-0">
<VoteButtons event={thread} />
<div className="flex-1 min-w-0">
<div className="flex items-center gap-2 mb-2">
<h3 className="font-semibold text-lg leading-tight line-clamp-2">
{title}
</h3>
{thread._relaySource && (
<Badge variant="outline" className="text-xs shrink-0">
<Server className="w-3 h-3 mr-1" />
{formatRelayName(thread._relaySource)}
</Badge>
)}
</div>
<div className="flex items-center gap-2 text-sm text-muted-foreground">
<Badge variant="secondary" className="text-xs">
<topicInfo.icon className="w-3 h-3 mr-1" />
{topicInfo.label}
</Badge>
)}
</div>
<div className="flex items-center gap-2 text-sm text-muted-foreground">
<Badge variant="secondary" className="text-xs">
<topicInfo.icon className="w-3 h-3 mr-1" />
{topicInfo.label}
</Badge>
<div className="flex items-center gap-1">
<Clock className="w-3 h-3" />
{timeAgo}
<div className="flex items-center gap-1">
<Clock className="w-3 h-3" />
{timeAgo}
</div>
</div>
</div>
</div>
</div>
</CardHeader>
<CardContent className="pt-0">
<div className="text-sm text-muted-foreground leading-relaxed">
{contentPreview}
</div>
<div className="flex items-center justify-between mt-3 pt-3 border-t">
<div className="flex items-center gap-2 text-sm text-muted-foreground">
<div className="flex items-center gap-2 text-sm text-muted-foreground shrink-0">
<UserAvatar userId={thread.pubkey} size="xSmall" />
<Username
userId={thread.pubkey}
@ -111,9 +103,12 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC @@ -111,9 +103,12 @@ export default function ThreadCard({ thread, onThreadClick, className }: ThreadC
skeletonClassName="h-4 w-20"
/>
</div>
<Button variant="ghost" size="sm" className="h-8 px-2">
{t('Read more')}
</Button>
</div>
</CardHeader>
<CardContent className="pt-0">
<div className="text-sm text-muted-foreground leading-relaxed">
{contentPreview}
</div>
</CardContent>
</Card>

Loading…
Cancel
Save