chore: tweak donate page
This commit is contained in:
parent
7625277beb
commit
849b9ed092
@ -1,13 +1,12 @@
|
||||
import "./ZapButton.css";
|
||||
import { faBolt } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { useState } from "react";
|
||||
import { HexKey } from "@snort/nostr";
|
||||
|
||||
import { useUserProfile } from "Hooks/useUserProfile";
|
||||
import SendSats from "Element/SendSats";
|
||||
import Icon from "Icons/Icon";
|
||||
|
||||
const ZapButton = ({ pubkey, lnurl }: { pubkey: HexKey; lnurl?: string }) => {
|
||||
const ZapButton = ({ pubkey, lnurl, children }: { pubkey: HexKey; lnurl?: string; children?: React.ReactNode }) => {
|
||||
const profile = useUserProfile(pubkey);
|
||||
const [zap, setZap] = useState(false);
|
||||
const service = lnurl ?? (profile?.lud16 || profile?.lud06);
|
||||
@ -15,8 +14,9 @@ const ZapButton = ({ pubkey, lnurl }: { pubkey: HexKey; lnurl?: string }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="zap-button" onClick={() => setZap(true)}>
|
||||
<FontAwesomeIcon icon={faBolt} />
|
||||
<div className="zap-button flex" onClick={() => setZap(true)}>
|
||||
<Icon name="zap" className={children ? "mr5" : ""} size={15} />
|
||||
{children}
|
||||
</div>
|
||||
<SendSats
|
||||
target={profile?.display_name || profile?.name}
|
||||
|
@ -98,20 +98,24 @@ const DonatePage = () => {
|
||||
<p>
|
||||
<FormattedMessage defaultMessage="Each contributor will get paid a percentage of all donations and NIP-05 orders, you can see the split amounts below" />
|
||||
</p>
|
||||
<div className="flex">
|
||||
<div className="mr10">
|
||||
<FormattedMessage defaultMessage="Lightning Donation: " />
|
||||
<div className="card">
|
||||
<div className="flex">
|
||||
<div className="mr10">
|
||||
<FormattedMessage defaultMessage="Lightning Donation: " />
|
||||
</div>
|
||||
<ZapButton pubkey={bech32ToHex(SnortPubKey)} lnurl={DonateLNURL}>
|
||||
<FormattedMessage defaultMessage="Donate" />
|
||||
</ZapButton>
|
||||
</div>
|
||||
<ZapButton pubkey={bech32ToHex(SnortPubKey)} lnurl={DonateLNURL} />
|
||||
{today && (
|
||||
<small>
|
||||
<FormattedMessage
|
||||
defaultMessage="Total today (UTC): {amount} sats"
|
||||
values={{ amount: today.donations.toLocaleString() }}
|
||||
/>
|
||||
</small>
|
||||
)}
|
||||
</div>
|
||||
{today && (
|
||||
<small>
|
||||
<FormattedMessage
|
||||
defaultMessage="Total today (UTC): {amount} sats"
|
||||
values={{ amount: today.donations.toLocaleString() }}
|
||||
/>
|
||||
</small>
|
||||
)}
|
||||
<h3>
|
||||
<FormattedMessage defaultMessage="Primary Developers" />
|
||||
</h3>
|
||||
|
Loading…
x
Reference in New Issue
Block a user