fix: stream zaps

fixes #93
This commit is contained in:
2023-11-14 14:04:07 +00:00
parent 9e3b2c1ee7
commit 148e399775
10 changed files with 70 additions and 126 deletions

View File

@ -5,11 +5,13 @@ import { NostrPrefix, encodeTLV, parseNostrLink } from "@snort/system";
import { unwrap } from "@snort/shared";
import { useCurrentStreamFeed } from "hooks/current-stream-feed";
import { findTag } from "utils";
import { useZapGoal } from "hooks/goals";
export function ChatPopout() {
const params = useParams();
const link = parseNostrLink(unwrap(params.id));
const ev = useCurrentStreamFeed(link, true);
const goal = useZapGoal(findTag(ev, "goal"));
const lnk = parseNostrLink(encodeTLV(NostrPrefix.Address, findTag(ev, "d") ?? "", undefined, ev?.kind, ev?.pubkey));
const chat = Boolean(new URL(window.location.href).searchParams.get("chat"));
@ -22,6 +24,7 @@ export function ChatPopout() {
canWrite: chat,
showHeader: false,
}}
goal={goal}
/>
</div>
);