split SettingsSection out of SettingsTab, replace usage (#10735)

* split SettingsSection out of SettingsTab, replace usage

* correct copyright

* fix VoipRoomSettingsTab
This commit is contained in:
Kerry 2023-05-01 10:37:40 +12:00 committed by GitHub
parent 35376996b0
commit 58c942be45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 174 additions and 72 deletions

View file

@ -28,6 +28,7 @@ import SettingsTab from "../SettingsTab";
import { ElementCall } from "../../../../../models/Call";
import { useRoomState } from "../../../../../hooks/useRoomState";
import SdkConfig, { DEFAULTS } from "../../../../../SdkConfig";
import { SettingsSection } from "../../shared/SettingsSection";
interface ElementCallSwitchProps {
room: Room;
@ -100,10 +101,12 @@ interface Props {
export const VoipRoomSettingsTab: React.FC<Props> = ({ room }) => {
return (
<SettingsTab heading={_t("Voice & Video")}>
<SettingsSubsection heading={_t("Call type")}>
<ElementCallSwitch room={room} />
</SettingsSubsection>
<SettingsTab>
<SettingsSection heading={_t("Voice & Video")}>
<SettingsSubsection heading={_t("Call type")}>
<ElementCallSwitch room={room} />
</SettingsSubsection>
</SettingsSection>
</SettingsTab>
);
};