From 9905afd2ad549460014cce0ce7eafa97bdca86c2 Mon Sep 17 00:00:00 2001 From: Timo K Date: Fri, 10 Apr 2026 18:45:34 +0200 Subject: [PATCH] add appBar logging --- src/AppBar.tsx | 5 +++++ src/components/InCallFooter.tsx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/AppBar.tsx b/src/AppBar.tsx index 72ee9285..e25cd51d 100644 --- a/src/AppBar.tsx +++ b/src/AppBar.tsx @@ -19,6 +19,7 @@ import { import { Button, Heading, Tooltip } from "@vector-im/compound-web"; import { CollapseIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; import { useTranslation } from "react-i18next"; +import { logger } from "matrix-js-sdk/lib/logger"; import { Header, LeftNav, RightNav } from "./Header"; import { platform } from "./Platform"; @@ -132,6 +133,10 @@ export function useAppBarSecondaryButton(button: ReactNode): void { if (setSecondaryButton !== undefined) { setSecondaryButton(button); return (): void => setSecondaryButton(""); + } else { + logger.warn( + "[AppBar] useAppBarSecondaryButton called without AppBarContext provider, this will have no effect", + ); } }, [button, setSecondaryButton]); } diff --git a/src/components/InCallFooter.tsx b/src/components/InCallFooter.tsx index 88c3d78a..d0906305 100644 --- a/src/components/InCallFooter.tsx +++ b/src/components/InCallFooter.tsx @@ -157,7 +157,8 @@ export const InCallFooter: FC = ({ if (audioOutputButton) buttons.push(audioOutputButton); useAppBarSecondaryButton( - , + // , +
, ); buttons.push(