From e9f110a4c53e0b0a2a85033700afb2e4d73f27de Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 6 Jun 2017 14:50:43 +0100 Subject: [PATCH] Don't show add widget if there are more than one existing widgets --- src/components/views/rooms/AppsDrawer.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index ed21fb6d77..37cddf8a2e 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -140,18 +140,21 @@ module.exports = React.createClass({ userId={this.props.userId} />); + const addWidget = this.state.apps && this.state.apps.length < 2 && + (
+ [+] Add a widget +
); + return (
{apps}
-
- [+] Add a widget -
+ {addWidget}
); },