feat: collapse long notes

This commit is contained in:
codytseng
2025-04-28 22:32:52 +08:00
parent 3ffad2ed49
commit 3a98629617
16 changed files with 95 additions and 28 deletions

View File

@@ -9,7 +9,6 @@ import Content from '../Content'
import { FormattedTimestamp } from '../FormattedTimestamp'
import ImageGallery from '../ImageGallery'
import NoteOptions from '../NoteOptions'
import NoteStats from '../NoteStats'
import ParentNotePreview from '../ParentNotePreview'
import UserAvatar from '../UserAvatar'
import Username from '../Username'
@@ -18,16 +17,12 @@ export default function Note({
event,
size = 'normal',
className,
hideParentNotePreview = false,
hideStats = false,
fetchNoteStats = false
hideParentNotePreview = false
}: {
event: Event
size?: 'normal' | 'small'
className?: string
hideParentNotePreview?: boolean
hideStats?: boolean
fetchNoteStats?: boolean
}) {
const { push } = useSecondaryPage()
const parentEventId = useMemo(
@@ -78,9 +73,6 @@ export default function Note({
{event.kind === ExtendedKind.PICTURE && imageInfos.length > 0 && (
<ImageGallery images={imageInfos} />
)}
{!hideStats && (
<NoteStats className="mt-3" event={event} fetchIfNotExisting={fetchNoteStats} />
)}
</div>
)
}