From 2a6d7e6e8ed15bc00b56f07188b1ee6bf8da0b16 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 29 Mar 2018 17:25:06 +0100 Subject: [PATCH] Use less confusing values on radio buttons --- src/components/structures/GroupView.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index a491bc65e0..9fbba0987a 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -400,6 +400,9 @@ FeaturedRoom.contextTypes = GroupContext; RoleUserList.contextTypes = GroupContext; FeaturedUser.contextTypes = GroupContext; +const GROUP_JOINABLE = "GROUP_JOINABLE"; +const GROUP_NOT_JOINABLE = "GROUP_NOT_JOINABLE"; + export default React.createClass({ displayName: 'GroupView', @@ -613,7 +616,7 @@ export default React.createClass({ _onJoinableChange: function(ev) { this.setState({ - joinableForm: { isJoinable: ev.target.value === "true" }, + joinableForm: { isJoinable: ev.target.value === GROUP_JOINABLE }, }); }, @@ -950,7 +953,7 @@ export default React.createClass({