From 1e945cd13b78427f9ad0ae2a03e69c4f1dd88d40 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 10 Feb 2016 11:48:35 +0000 Subject: [PATCH] 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). --- src/components/structures/UserSettings.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 8f7e138bc0..2b35c861b4 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -315,6 +315,16 @@ module.exports = React.createClass({ onFinished={this.onPasswordChanged} /> ); } + var notification_area; + if (!MatrixClientPeg.get().isGuest()) { + notification_area = (
+

Notifications

+ +
+ +
+
); + } return (
@@ -364,11 +374,7 @@ module.exports = React.createClass({ {accountJsx}
-

Notifications

- -
- -
+ {notification_area}

Advanced