@@ -1739,13 +1739,13 @@ export const UserInfoHeader: React.FC<{
1739
1739
interface IProps {
1740
1740
user : Member ;
1741
1741
room ?: Room ;
1742
- phase : RightPanelPhases . RoomMemberInfo | RightPanelPhases . SpaceMemberInfo | RightPanelPhases . EncryptionPanel ;
1742
+ phase : RightPanelPhases . MemberInfo | RightPanelPhases . EncryptionPanel ;
1743
1743
onClose ( ) : void ;
1744
1744
verificationRequest ?: VerificationRequest ;
1745
1745
verificationRequestPromise ?: Promise < VerificationRequest > ;
1746
1746
}
1747
1747
1748
- const UserInfo : React . FC < IProps > = ( { user, room, onClose, phase = RightPanelPhases . RoomMemberInfo , ...props } ) => {
1748
+ const UserInfo : React . FC < IProps > = ( { user, room, onClose, phase = RightPanelPhases . MemberInfo , ...props } ) => {
1749
1749
const cli = useContext ( MatrixClientContext ) ;
1750
1750
1751
1751
// fetch latest room member if we have a room, so we don't show historical information, falling back to user
@@ -1767,8 +1767,6 @@ const UserInfo: React.FC<IProps> = ({ user, room, onClose, phase = RightPanelPha
1767
1767
// We have no previousPhase for when viewing a UserInfo without a Room at this time
1768
1768
if ( room && phase === RightPanelPhases . EncryptionPanel ) {
1769
1769
cardState = { member } ;
1770
- } else if ( room ?. isSpaceRoom ( ) ) {
1771
- cardState = { spaceId : room . roomId } ;
1772
1770
}
1773
1771
1774
1772
const onEncryptionPanelClose = ( ) : void => {
@@ -1777,8 +1775,7 @@ const UserInfo: React.FC<IProps> = ({ user, room, onClose, phase = RightPanelPha
1777
1775
1778
1776
let content : JSX . Element | undefined ;
1779
1777
switch ( phase ) {
1780
- case RightPanelPhases . RoomMemberInfo :
1781
- case RightPanelPhases . SpaceMemberInfo :
1778
+ case RightPanelPhases . MemberInfo :
1782
1779
content = (
1783
1780
< BasicUserInfo
1784
1781
room = { room as Room }
@@ -1823,7 +1820,7 @@ const UserInfo: React.FC<IProps> = ({ user, room, onClose, phase = RightPanelPha
1823
1820
closeLabel = { closeLabel }
1824
1821
cardState = { cardState }
1825
1822
onBack = { ( ev : ButtonEvent ) => {
1826
- if ( RightPanelStore . instance . previousCard . phase === RightPanelPhases . RoomMemberList ) {
1823
+ if ( RightPanelStore . instance . previousCard . phase === RightPanelPhases . MemberList ) {
1827
1824
PosthogTrackers . trackInteraction ( "WebRightPanelRoomUserInfoBackButton" , ev ) ;
1828
1825
}
1829
1826
} }
0 commit comments