feat: cache post content

This commit is contained in:
codytseng 2025-03-09 15:28:12 +08:00
parent 6c2d3e1a64
commit b04e628e00
4 changed files with 67 additions and 4 deletions

View file

@ -10,11 +10,11 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
import { useScreenSize } from '@/providers/ScreenSizeProvider'
import { Event } from 'nostr-tools'
import { Dispatch, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '../ui/sheet'
import NormalPostContent from './NormalPostContent'
import PicturePostContent from './PicturePostContent'
import Title from './Title'
import { useTranslation } from 'react-i18next'
export default function PostEditor({
defaultContent = '',
@ -55,7 +55,7 @@ export default function PostEditor({
</TabsContent>
</Tabs>
)
}, [parentEvent])
}, [parentEvent, defaultContent])
if (isSmallScreen) {
return (