2024-08-05 19:45:26 -05:00
|
|
|
import React, { useEffect } from "react";
|
2024-04-23 18:52:55 -05:00
|
|
|
import { nip19 } from "nostr-tools";
|
2024-09-17 13:55:51 -05:00
|
|
|
import appConfig from "@/config/appConfig";
|
2024-04-22 19:09:46 -05:00
|
|
|
|
2024-04-23 18:52:55 -05:00
|
|
|
const ZapForm = ({ event }) => {
|
|
|
|
const nAddress = nip19.naddrEncode({
|
|
|
|
kind: event?.kind,
|
|
|
|
pubkey: event?.pubkey,
|
|
|
|
identifier: event.d,
|
2024-09-17 13:55:51 -05:00
|
|
|
relays: [...appConfig.defaultRelayUrls]
|
2024-08-05 19:45:26 -05:00
|
|
|
});
|
2024-04-22 19:09:46 -05:00
|
|
|
|
|
|
|
return (
|
2024-04-23 18:52:55 -05:00
|
|
|
<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;
|