feat: improve mobile experience

This commit is contained in:
codytseng
2025-01-02 21:57:14 +08:00
parent 8ec0d46d58
commit 3946e603b3
98 changed files with 2508 additions and 1058 deletions

View File

@@ -0,0 +1,17 @@
import { Event } from 'nostr-tools'
import { useTranslation } from 'react-i18next'
import { SimpleUserAvatar } from '../UserAvatar'
export default function Title({ parentEvent }: { parentEvent?: Event }) {
const { t } = useTranslation()
return parentEvent ? (
<div className="flex gap-2 items-center w-full">
<div className="shrink-0">{t('Reply to')}</div>
<SimpleUserAvatar userId={parentEvent.pubkey} size="tiny" />
<div className="flex-1 w-0 truncate">{parentEvent.content}</div>
</div>
) : (
t('New post')
)
}