This commit is contained in:
Jon Staab
2025-07-04 06:22:19 -07:00
parent 9e8aa2ef3a
commit bfed277ea9
21 changed files with 766 additions and 146 deletions
@@ -0,0 +1,27 @@
<script lang="ts">
import {deriveZapperForPubkey} from "@welshman/app"
import Button from "@lib/components/Button.svelte"
import Icon from "@lib/components/Icon.svelte"
import Zap from "@app/components/Zap.svelte"
import WalletConnect from "@app/components/WalletConnect.svelte"
import {pushModal} from "@app/modal"
import {wallet} from "@app/state"
const {url, event} = $props()
const zapper = deriveZapperForPubkey(event.pubkey)
const onClick = () => {
if ($wallet) {
pushModal(Zap, {url, pubkey: event.pubkey, eventId: event.id})
} else {
pushModal(WalletConnect)
}
}
</script>
{#if $zapper?.allowsNostr}
<Button onclick={onClick} class="btn join-item btn-xs">
<Icon icon="bolt" size={4} />
</Button>
{/if}