You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Merge pull request #5419 from matrix-org/t3chguy/fix/15701
Fix New Room Intro invite to this room button
This commit is contained in:
@@ -39,7 +39,7 @@ interface IProps extends React.InputHTMLAttributes<Element> {
|
|||||||
tabIndex?: number;
|
tabIndex?: number;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
className?: string;
|
className?: string;
|
||||||
onClick?(e?: ButtonEvent): void;
|
onClick(e?: ButtonEvent): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IAccessibleButtonProps extends React.InputHTMLAttributes<Element> {
|
interface IAccessibleButtonProps extends React.InputHTMLAttributes<Element> {
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ const NewRoomIntro = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onInviteClick = () => {
|
||||||
|
dis.dispatch({ action: "view_invite", roomId });
|
||||||
|
};
|
||||||
|
|
||||||
const avatarUrl = room.currentState.getStateEvents(EventType.RoomAvatar, "")?.getContent()?.url;
|
const avatarUrl = room.currentState.getStateEvents(EventType.RoomAvatar, "")?.getContent()?.url;
|
||||||
body = <React.Fragment>
|
body = <React.Fragment>
|
||||||
<MiniAvatarUploader
|
<MiniAvatarUploader
|
||||||
@@ -116,7 +120,7 @@ const NewRoomIntro = () => {
|
|||||||
})}</p>
|
})}</p>
|
||||||
<p>{topicText}</p>
|
<p>{topicText}</p>
|
||||||
<div className="mx_NewRoomIntro_buttons">
|
<div className="mx_NewRoomIntro_buttons">
|
||||||
<AccessibleButton className="mx_NewRoomIntro_inviteButton" kind="primary">
|
<AccessibleButton className="mx_NewRoomIntro_inviteButton" kind="primary" onClick={onInviteClick}>
|
||||||
{_t("Invite to this room")}
|
{_t("Invite to this room")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user