feat: hide long form content

This commit is contained in:
codytseng
2024-11-10 12:21:16 +08:00
parent 6821b92e63
commit 678d1daa2c

View File

@@ -1,11 +1,13 @@
import { Repeat2 } from 'lucide-react'
import { Event, verifyEvent } from 'nostr-tools'
import { Event, kinds, verifyEvent } from 'nostr-tools'
import Username from '../Username'
import ShortTextNoteCard from './ShortTextNoteCard'
export default function RepostNoteCard({ event, className }: { event: Event; className?: string }) {
const targetEvent = event.content ? (JSON.parse(event.content) as Event) : null
if (!targetEvent || !verifyEvent(targetEvent)) return null
if (!targetEvent || !verifyEvent(targetEvent) || targetEvent.kind !== kinds.ShortTextNote) {
return null
}
return (
<div className={className}>