From 2bc8d6d3a41f31e9c485621331379a48b14283f6 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 d1f5de0b95..0be9ffb77a 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -399,6 +399,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', @@ -612,7 +615,7 @@ export default React.createClass({ _onJoinableChange: function(ev) { this.setState({ - joinableForm: { isJoinable: ev.target.value === "true" }, + joinableForm: { isJoinable: ev.target.value === GROUP_JOINABLE }, }); }, @@ -949,7 +952,7 @@ export default React.createClass({