bug: zap button not working

This commit is contained in:
Kieran 2023-03-03 11:56:03 +00:00
parent 9cc163cf1c
commit 27edf5f592
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 2 additions and 7 deletions

View File

@ -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