2025-04-14 13:23:29 -05:00
|
|
|
import React from 'react';
|
2025-04-02 17:47:30 -05:00
|
|
|
import { nip19 } from 'nostr-tools';
|
|
|
|
import appConfig from '@/config/appConfig';
|
2024-04-22 19:09:46 -05:00
|
|
|
|
2024-04-23 18:52:55 -05:00
|
|
|
const ZapForm = ({ event }) => {
|
2025-04-02 17:47:30 -05:00
|
|
|
const nAddress = nip19.naddrEncode({
|
|
|
|
kind: event?.kind,
|
|
|
|
pubkey: event?.pubkey,
|
|
|
|
identifier: event.d,
|
|
|
|
relays: appConfig.defaultRelayUrls,
|
|
|
|
});
|
2024-04-22 19:09:46 -05:00
|
|
|
|
2025-04-02 17:47:30 -05:00
|
|
|
return (
|
|
|
|
<iframe
|
|
|
|
src={`https://zapper.nostrapps.org/zap?id=${nAddress}`}
|
|
|
|
width="100%"
|
|
|
|
height="100%"
|
|
|
|
style={{ border: 'none' }}
|
|
|
|
title="zapper app"
|
|
|
|
></iframe>
|
|
|
|
);
|
2024-04-22 19:09:46 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
export default ZapForm;
|