feat: highlight (#346)

This commit is contained in:
Cody Tseng
2025-05-22 22:39:13 +08:00
committed by GitHub
parent ef0dc9e923
commit 6c91ba9eff
8 changed files with 197 additions and 29 deletions

View File

@@ -1,22 +1,11 @@
import { Card } from '@/components/ui/card'
import dayjs from 'dayjs'
import { createFakeEvent } from '@/lib/event'
import Content from '../Content'
export default function Preview({ content }: { content: string }) {
return (
<Card className="p-3 min-h-52">
<Content
event={{
content,
kind: 1,
tags: [],
created_at: dayjs().unix(),
id: '',
pubkey: '',
sig: ''
}}
className="pointer-events-none h-full"
/>
<Content event={createFakeEvent({ content })} className="pointer-events-none h-full" />
</Card>
)
}