From 710c7b10622ab335caee95236b34fce6bcd1c3f4 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 8 Dec 2023 15:57:39 +0000 Subject: [PATCH] fix: hide clip button --- src/element/clip-button.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/element/clip-button.tsx b/src/element/clip-button.tsx index 0260a5a..e7121e5 100644 --- a/src/element/clip-button.tsx +++ b/src/element/clip-button.tsx @@ -9,13 +9,14 @@ import { unwrap } from "@snort/shared"; import { useContext } from "react"; import { SnortContext } from "@snort/system-react"; import { Icon } from "./icon"; +import { StreamState } from ".."; export function ClipButton({ ev }: { ev: TaggedNostrEvent }) { const system = useContext(SnortContext); - const { id, service } = extractStreamInfo(ev); + const { id, service, status } = extractStreamInfo(ev); const login = useLogin(); - if (!service) return; + if (!service || status !== StreamState.Live) return; async function makeClip() { if (!service || !id) return;