mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Fix list of members in space preview (#7356)
This commit is contained in:
parent
9ed771ad7a
commit
5ee356daaa
1 changed files with 3 additions and 3 deletions
|
@ -128,9 +128,9 @@ const useMyRoomMembership = (room: Room) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const SpaceInfo = ({ space }: { space: Room }) => {
|
const SpaceInfo = ({ space }: { space: Room }) => {
|
||||||
// summary will begin as undefined whilst loading and go null if it fails to load.
|
// summary will begin as undefined whilst loading and go null if it fails to load or we are not invited.
|
||||||
const summary = useAsyncMemo(async () => {
|
const summary = useAsyncMemo(async () => {
|
||||||
if (space.getMyMembership() !== "invite") return;
|
if (space.getMyMembership() !== "invite") return null;
|
||||||
try {
|
try {
|
||||||
return space.client.getRoomSummary(space.roomId);
|
return space.client.getRoomSummary(space.roomId);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -141,7 +141,7 @@ const SpaceInfo = ({ space }: { space: Room }) => {
|
||||||
const membership = useMyRoomMembership(space);
|
const membership = useMyRoomMembership(space);
|
||||||
|
|
||||||
let visibilitySection;
|
let visibilitySection;
|
||||||
if (joinRule === "public") {
|
if (joinRule === JoinRule.Public) {
|
||||||
visibilitySection = <span className="mx_SpaceRoomView_info_public">
|
visibilitySection = <span className="mx_SpaceRoomView_info_public">
|
||||||
{ _t("Public space") }
|
{ _t("Public space") }
|
||||||
</span>;
|
</span>;
|
||||||
|
|
Loading…
Reference in a new issue