From d24c324398b8a8b3ab104fe7b8bca1cad64a1e0b Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Sun, 1 Jan 2017 08:17:02 -0500 Subject: [PATCH] Adjust labels depending on first/other suggestions/vetoes --- js/components/NewSuggestion.js | 10 ++++++++-- js/components/TopBar.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/components/NewSuggestion.js b/js/components/NewSuggestion.js index b4a37f6..1ead116 100644 --- a/js/components/NewSuggestion.js +++ b/js/components/NewSuggestion.js @@ -102,11 +102,17 @@ module.exports = React.createClass({ render: function() { var attendeeList = this.getAttendeeList(); var buttonDisabled = this.state.attendee == null || !this.state.suggestion; + var suggestionLabel = "Add Suggestion To:"; + var byLabel = "Suggested By:" + if (Object.keys(this.props.suggestions).length > 0) { + suggestionLabel = "Veto With:"; + byLabel = "Vetoed By:" + } return ( - Add Suggestion/Veto To: + {suggestionLabel} - Suggested By: + {byLabel} + onClick={this.handleNewUserSubmit}>New User