bug: zap button not working
This commit is contained in:
parent
9cc163cf1c
commit
27edf5f592
@ -2,25 +2,20 @@ import "./ZapButton.css";
|
||||
import { faBolt } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { useState } from "react";
|
||||
import { useLongPress } from "use-long-press";
|
||||
import { HexKey } from "@snort/nostr";
|
||||
|
||||
import { useUserProfile } from "Feed/ProfileFeed";
|
||||
import { HexKey } from "@snort/nostr";
|
||||
import SendSats from "Element/SendSats";
|
||||
|
||||
const ZapButton = ({ pubkey, lnurl }: { pubkey: HexKey; lnurl?: string }) => {
|
||||
const profile = useUserProfile(pubkey);
|
||||
const [zap, setZap] = useState(false);
|
||||
const service = lnurl ?? (profile?.lud16 || profile?.lud06);
|
||||
const longPress = useLongPress(() => {
|
||||
console.debug("long press");
|
||||
});
|
||||
|
||||
if (!service) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="zap-button" {...longPress()}>
|
||||
<div className="zap-button" onClick={() => setZap(true)}>
|
||||
<FontAwesomeIcon icon={faBolt} />
|
||||
</div>
|
||||
<SendSats
|
||||
|
Loading…
Reference in New Issue
Block a user