fix: 🐛

This commit is contained in:
codytseng
2025-08-27 15:05:47 +08:00
parent d90f6f8261
commit f41536a793
21 changed files with 94 additions and 43 deletions

View File

@@ -10,7 +10,9 @@ import HighlightPreview from './HighlightPreview'
import LiveEventPreview from './LiveEventPreview'
import LongFormArticlePreview from './LongFormArticlePreview'
import NormalContentPreview from './NormalContentPreview'
import PictureNotePreview from './PictureNotePreview'
import PollPreview from './PollPreview'
import VideoNotePreview from './VideoNotePreview'
export default function ContentPreview({
event,
@@ -40,7 +42,6 @@ export default function ContentPreview({
[
kinds.ShortTextNote,
ExtendedKind.COMMENT,
ExtendedKind.PICTURE,
ExtendedKind.VOICE,
ExtendedKind.VOICE_COMMENT
].includes(event.kind)
@@ -60,6 +61,14 @@ export default function ContentPreview({
return <LongFormArticlePreview event={event} className={className} />
}
if (event.kind === ExtendedKind.VIDEO || event.kind === ExtendedKind.SHORT_VIDEO) {
return <VideoNotePreview event={event} className={className} />
}
if (event.kind === ExtendedKind.PICTURE) {
return <PictureNotePreview event={event} className={className} />
}
if (event.kind === ExtendedKind.GROUP_METADATA) {
return <GroupMetadataPreview event={event} className={className} />
}