Add funding goals

This commit is contained in:
Jon Staab
2025-07-07 15:28:36 -07:00
parent 1d07097350
commit 6ee4ac1a89
12 changed files with 567 additions and 21 deletions
+27
View File
@@ -0,0 +1,27 @@
<script lang="ts">
import {deriveZapperForPubkey} from "@welshman/app"
import Button from "@lib/components/Button.svelte"
import Zap from "@app/components/Zap.svelte"
import InfoZapperError from "@app/components/InfoZapperError.svelte"
import WalletConnect from "@app/components/WalletConnect.svelte"
import {pushModal} from "@app/modal"
import {wallet} from "@app/state"
const {url, event, children, ...props} = $props()
const zapper = deriveZapperForPubkey(event.pubkey)
const onClick = () => {
if (!$zapper?.allowsNostr) {
pushModal(InfoZapperError, {url, pubkey: event.pubkey, eventId: event.id})
} else if ($wallet) {
pushModal(Zap, {url, pubkey: event.pubkey, eventId: event.id})
} else {
pushModal(WalletConnect)
}
}
</script>
<Button onclick={onClick} {...props}>
{@render children?.()}
</Button>