From 518a530f43a1e21728324a085d9ad9b15e991f72 Mon Sep 17 00:00:00 2001 From: khlieng Date: Sun, 22 Feb 2015 09:03:03 +0100 Subject: [PATCH] Render userlist to a div if theres only one user --- client/src/js/components/UserList.jsx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/client/src/js/components/UserList.jsx b/client/src/js/components/UserList.jsx index 06bddff9..a69ae57a 100644 --- a/client/src/js/components/UserList.jsx +++ b/client/src/js/components/UserList.jsx @@ -46,13 +46,21 @@ var UserList = React.createClass({ }); } - return ( -
- - {users} - -
- ); + if (users.length !== 1) { + return ( +
+ + {users} + +
+ ); + } else { + return ( +
+
{users}
+
+ ); + } } });