Update copy

This commit is contained in:
Michael Telatynski 2021-09-29 16:05:03 +01:00
parent 886f8d31fb
commit 0697470cc8
3 changed files with 17 additions and 56 deletions

View file

@ -15,11 +15,11 @@ limitations under the License.
*/
import React, { ComponentProps, useMemo, useState } from 'react';
import ConfirmUserActionDialog from "./ConfirmUserActionDialog";
import SpaceStore from "../../../stores/SpaceStore";
import { Room } from "matrix-js-sdk/src/models/room";
import SpaceChildrenPicker from "../spaces/SpaceChildrenPicker";
import { _t } from '../../../languageHandler';
type BaseProps = ComponentProps<typeof ConfirmUserActionDialog>;
interface IProps extends Omit<BaseProps, "groupMember" | "matrixClient" | "children" | "onFinished"> {
@ -54,14 +54,7 @@ const ConfirmSpaceUserActionDialog: React.FC<IProps> = ({
const selectedRooms = useMemo(() => new Set(roomsToLeave), [roomsToLeave]);
let warning: JSX.Element;
if (!spaceChildren.length) {
warning = <div className="mx_ConfirmSpaceUserActionDialog_warning">
{ _t("Youre not an admin of anything theyre a member of in <SpaceName/>, " +
"so banning wont remove them from any rooms or spaces in <SpaceName/>.", {}, {
SpaceName: () => <b>{ space.name }</b>,
}) }
</div>;
} else if (warningMessage) {
if (warningMessage) {
warning = <div className="mx_ConfirmSpaceUserActionDialog_warning">
{ warningMessage }
</div>;