feat: zap (#107)

This commit is contained in:
Cody Tseng
2025-03-01 23:52:05 +08:00
committed by GitHub
parent 407a6fb802
commit 249593d547
72 changed files with 2582 additions and 818 deletions

View File

@@ -0,0 +1,24 @@
import { Button } from '@/components/ui/button'
import { useNostr } from '@/providers/NostrProvider'
import { Zap } from 'lucide-react'
import { useState } from 'react'
import ZapDialog from '../ZapDialog'
export default function ProfileZapButton({ pubkey }: { pubkey: string }) {
const { checkLogin } = useNostr()
const [open, setOpen] = useState(false)
return (
<>
<Button
variant="secondary"
size="icon"
className="rounded-full"
onClick={() => checkLogin(() => setOpen(true))}
>
<Zap className="text-yellow-400" />
</Button>
<ZapDialog open={open} setOpen={setOpen} pubkey={pubkey} />
</>
)
}