You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Don't show the Notifications widget for guests since they can't use them (and it throws an error if you try to mount it).
This commit is contained in:
@@ -315,6 +315,16 @@ module.exports = React.createClass({
|
||||
onFinished={this.onPasswordChanged} />
|
||||
);
|
||||
}
|
||||
var notification_area;
|
||||
if (!MatrixClientPeg.get().isGuest()) {
|
||||
notification_area = (<div>
|
||||
<h2>Notifications</h2>
|
||||
|
||||
<div className="mx_UserSettings_section">
|
||||
<Notifications/>
|
||||
</div>
|
||||
</div>);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mx_UserSettings">
|
||||
@@ -364,11 +374,7 @@ module.exports = React.createClass({
|
||||
{accountJsx}
|
||||
</div>
|
||||
|
||||
<h2>Notifications</h2>
|
||||
|
||||
<div className="mx_UserSettings_section">
|
||||
<Notifications/>
|
||||
</div>
|
||||
{notification_area}
|
||||
|
||||
<h2>Advanced</h2>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user