mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
Ensure UserInfo can be rendered without a room (#7687)
Co-authored-by: David Baker <dave@matrix.org>
This commit is contained in:
parent
bfab09e977
commit
afe6021c9a
1 changed files with 2 additions and 2 deletions
|
@ -1518,7 +1518,7 @@ export type Member = User | RoomMember | GroupMember;
|
|||
const UserInfoHeader: React.FC<{
|
||||
member: Member;
|
||||
e2eStatus: E2EStatus;
|
||||
roomId: string;
|
||||
roomId?: string;
|
||||
}> = ({ member, e2eStatus, roomId }) => {
|
||||
const cli = useContext(MatrixClientContext);
|
||||
const statusMessage = useUserStatusMessage(member);
|
||||
|
@ -1710,7 +1710,7 @@ const UserInfo: React.FC<IProps> = ({
|
|||
|
||||
const header = <React.Fragment>
|
||||
{ scopeHeader }
|
||||
<UserInfoHeader member={member} e2eStatus={e2eStatus} roomId={room.roomId} />
|
||||
<UserInfoHeader member={member} e2eStatus={e2eStatus} roomId={room?.roomId} />
|
||||
</React.Fragment>;
|
||||
return <BaseCard
|
||||
className={classes.join(" ")}
|
||||
|
|
Loading…
Reference in a new issue