mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 17:56:01 +03:00
Merge pull request #6945 from matrix-org/t3chguy/fix/19390
This commit is contained in:
commit
6bb47ec710
1 changed files with 4 additions and 2 deletions
|
@ -80,6 +80,7 @@ import { useAsyncMemo } from "../../hooks/useAsyncMemo";
|
|||
import Spinner from "../views/elements/Spinner";
|
||||
import GroupAvatar from "../views/avatars/GroupAvatar";
|
||||
import { useDispatcher } from "../../hooks/useDispatcher";
|
||||
import { useRoomState } from "../../hooks/useRoomState";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { shouldShowComponent } from "../../customisations/helpers/UIComponents";
|
||||
|
@ -127,7 +128,7 @@ const useMyRoomMembership = (room: Room) => {
|
|||
};
|
||||
|
||||
const SpaceInfo = ({ space }) => {
|
||||
const joinRule = space.getJoinRule();
|
||||
const joinRule = useRoomState(space, state => state.getJoinRule());
|
||||
|
||||
let visibilitySection;
|
||||
if (joinRule === "public") {
|
||||
|
@ -207,8 +208,9 @@ const SpacePreview = ({ space, onJoinButtonClicked, onRejectButtonClicked }: ISp
|
|||
|
||||
const spacesEnabled = SpaceStore.spacesEnabled;
|
||||
|
||||
const joinRule = useRoomState(space, state => state.getJoinRule());
|
||||
const cannotJoin = getEffectiveMembership(myMembership) === EffectiveMembership.Leave
|
||||
&& space.getJoinRule() !== JoinRule.Public;
|
||||
&& joinRule !== JoinRule.Public;
|
||||
|
||||
let inviterSection;
|
||||
let joinButtons;
|
||||
|
|
Loading…
Reference in a new issue