feat: hide long form content
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
import { Repeat2 } from 'lucide-react'
|
import { Repeat2 } from 'lucide-react'
|
||||||
import { Event, verifyEvent } from 'nostr-tools'
|
import { Event, kinds, verifyEvent } from 'nostr-tools'
|
||||||
import Username from '../Username'
|
import Username from '../Username'
|
||||||
import ShortTextNoteCard from './ShortTextNoteCard'
|
import ShortTextNoteCard from './ShortTextNoteCard'
|
||||||
|
|
||||||
export default function RepostNoteCard({ event, className }: { event: Event; className?: string }) {
|
export default function RepostNoteCard({ event, className }: { event: Event; className?: string }) {
|
||||||
const targetEvent = event.content ? (JSON.parse(event.content) as Event) : null
|
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 (
|
return (
|
||||||
<div className={className}>
|
<div className={className}>
|
||||||
|
|||||||
Reference in New Issue
Block a user