mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-01 09:54:37 +00:00
add appBar logging
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user