diff --git a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx index 37ac358660..1cfe023ba9 100644 --- a/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/GeneralRoomSettingsTab.tsx @@ -90,6 +90,18 @@ export default class GeneralRoomSettingsTab extends React.Component; } + let leaveSection; + if (room.getMyMembership() === "join") { + leaveSection = <> + { _t("Leave room") } +
+ + { _t('Leave room') } + +
+ ; + } + return (
{ _t("General") }
@@ -109,17 +121,7 @@ export default class GeneralRoomSettingsTab extends React.Component{ _t("Other") }
{ flairSection } { urlPreviewSettings } - - { _t("Leave room") } -
- - { _t('Leave room') } - -
+ { leaveSection } ); }