diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 54cc740343..e502430ea2 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -36,7 +36,6 @@ import { inviteMultipleToRoom, showRoomInviteDialog } from "../../RoomInvite"; import { UIComponent } from "../../settings/UIFeature"; import { UPDATE_EVENT } from "../../stores/AsyncStore"; import RightPanelStore from "../../stores/right-panel/RightPanelStore"; -import { IRightPanelCard } from "../../stores/right-panel/RightPanelStoreIPanelState"; import { RightPanelPhases } from "../../stores/right-panel/RightPanelStorePhases"; import ResizeNotifier from "../../utils/ResizeNotifier"; import { @@ -672,25 +671,11 @@ export default class SpaceRoomView extends React.PureComponent { if (payload.action !== Action.ViewUser && payload.action !== "view_3pid_invite") return; - if (payload.action === Action.ViewUser && payload.member) { - const spaceMemberInfoCard: IRightPanelCard = { - phase: RightPanelPhases.SpaceMemberInfo, - state: { spaceId: this.props.space.roomId, member: payload.member }, - }; - if (payload.push) { - RightPanelStore.instance.pushCard(spaceMemberInfoCard); - } else { - RightPanelStore.instance.setCards([ - { phase: RightPanelPhases.SpaceMemberList, state: { spaceId: this.props.space.roomId } }, - spaceMemberInfoCard, - ]); - } - } else if (payload.action === "view_3pid_invite" && payload.event) { - RightPanelStore.instance.setCard({ - phase: RightPanelPhases.Space3pidMemberInfo, - state: { spaceId: this.props.space.roomId, memberInfoEvent: payload.event }, - }); - } else { + /** + * The rest of the `ViewUser` and `view_3pid_invite` exists in the `` + * component. This deals specifically with showing the space members list + */ + if (!payload.member && !payload.event) { RightPanelStore.instance.setCard({ phase: RightPanelPhases.SpaceMemberList, state: { spaceId: this.props.space.roomId },