diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-07-31 12:08:36 -0700 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-08-04 08:47:18 -0700 |
commit | dfc6e80437e465bc01b454cf1d6bfdd4d3a70c85 (patch) | |
tree | 66ec3ff5348f401892783189680c331de61da276 /web/react/components | |
parent | dbf104686a9ca9de0da58ba602e1fdfe0b82087a (diff) | |
download | chat-dfc6e80437e465bc01b454cf1d6bfdd4d3a70c85.tar.gz chat-dfc6e80437e465bc01b454cf1d6bfdd4d3a70c85.tar.bz2 chat-dfc6e80437e465bc01b454cf1d6bfdd4d3a70c85.zip |
Fixed help text rendering on mobile
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/get_link_modal.jsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx index ab6045d2f..ea22ad0f3 100644 --- a/web/react/components/get_link_modal.jsx +++ b/web/react/components/get_link_modal.jsx @@ -24,13 +24,18 @@ module.exports = React.createClass({ } }, getInitialState: function() { - return { }; + return {copiedLink: false}; }, handleClick: function() { this.setState({copiedLink: true}); }, render: function() { var currentUser = UserStore.getCurrentUser(); + var copyLinkConfirm = null; + + if (this.state.copiedLink) { + copyLinkConfirm = <p className='copy-link-confirm'>Link copied to clipboard.</p>; + } if (currentUser != null) { return ( @@ -49,11 +54,7 @@ module.exports = React.createClass({ <div className='modal-footer'> <button type='button' className='btn btn-default' data-dismiss='modal'>Close</button> <button data-copy-btn='true' type='button' className='btn btn-primary pull-left' onClick={this.handleClick} data-clipboard-text={this.state.value}>Copy Link</button> - {this.state.copiedLink ? - <p className='copy-link-confirm'>Link copied to clipboard.</p> - : - null - } + {copyLinkConfirm} </div> </div> </div> |