Simplify passing of prop

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Eugen Rochko 2017-03-01 13:57:30 +01:00
parent 1fa2e7cc86
commit 95ebfa5610
1 changed files with 2 additions and 6 deletions

View File

@ -83,10 +83,6 @@ const ComposeForm = React.createClass({
this.props.onChangeSpoilerText(e.target.value); this.props.onChangeSpoilerText(e.target.value);
}, },
onPaste (files) {
this.props.onPaste(files);
},
componentDidUpdate (prevProps) { componentDidUpdate (prevProps) {
if (this.props.focusDate !== prevProps.focusDate) { if (this.props.focusDate !== prevProps.focusDate) {
// If replying to zero or one users, places the cursor at the end of the textbox. // If replying to zero or one users, places the cursor at the end of the textbox.
@ -105,7 +101,7 @@ const ComposeForm = React.createClass({
}, },
render () { render () {
const { intl, needsPrivacyWarning, mentionedDomains } = this.props; const { intl, needsPrivacyWarning, mentionedDomains, onPaste } = this.props;
const disabled = this.props.is_submitting || this.props.is_uploading; const disabled = this.props.is_submitting || this.props.is_uploading;
let publishText = ''; let publishText = '';
@ -154,7 +150,7 @@ const ComposeForm = React.createClass({
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested} onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
onSuggestionsClearRequested={this.onSuggestionsClearRequested} onSuggestionsClearRequested={this.onSuggestionsClearRequested}
onSuggestionSelected={this.onSuggestionSelected} onSuggestionSelected={this.onSuggestionSelected}
onPaste={this.onPaste} onPaste={onPaste}
/> />
<div style={{ marginTop: '10px', overflow: 'hidden' }}> <div style={{ marginTop: '10px', overflow: 'hidden' }}>