add appBar logging

This commit is contained in:
Timo K
2026-04-10 18:45:34 +02:00
parent 8956d55d5c
commit 9905afd2ad
2 changed files with 7 additions and 1 deletions

View File

@@ -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]);
}

View File

@@ -157,7 +157,8 @@ export const InCallFooter: FC<InCallFooterProps> = ({
if (audioOutputButton) buttons.push(audioOutputButton);
useAppBarSecondaryButton(
<SettingsButton key="settings" onClick={openSettings} />,
// <SettingsButton key="settings" onClick={openSettings} />,
<div style={{ backgroundColor: "red", width: "20px", height: "20px" }} />,
);
buttons.push(