From 555cf64080b027128f31a8637c5e02bfa1a3e521 Mon Sep 17 00:00:00 2001 From: V Date: Fri, 16 Jun 2023 19:46:39 +0200 Subject: BiggerStreamPreview: Hide element if no stream is found --- src/plugins/biggerStreamPreview/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/plugins/biggerStreamPreview') diff --git a/src/plugins/biggerStreamPreview/index.tsx b/src/plugins/biggerStreamPreview/index.tsx index d3ed713..acad564 100644 --- a/src/plugins/biggerStreamPreview/index.tsx +++ b/src/plugins/biggerStreamPreview/index.tsx @@ -61,14 +61,13 @@ export const handleViewPreview = async ({ guildId, channelId, ownerId }: Applica }; export const addViewStreamContext: NavContextMenuPatchCallback = (children, { userId }: { userId: string | bigint; }) => () => { - const streamPreviewItemIdentifier = "view-stream-preview"; - const stream = ApplicationStreamingStore.getAnyStreamForUser(userId); + if (!stream) return; const streamPreviewItem = ( stream && handleViewPreview(stream)} disabled={!stream} -- cgit