about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-01 13:57:30 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-03-01 13:57:30 +0100
commit95ebfa5610577426a5a8f5b6aee83af83dd4a9b4 (patch)
treee1f6893d67b7be7ace5092d1bb4a7eb2c2e0de14 /app/assets/javascripts/components/features
parent1fa2e7cc86bb392fd66c8e8dd8724221702e4cd0 (diff)
Simplify passing of prop
Diffstat (limited to 'app/assets/javascripts/components/features')
-rw-r--r--app/assets/javascripts/components/features/compose/components/compose_form.jsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/assets/javascripts/components/features/compose/components/compose_form.jsx b/app/assets/javascripts/components/features/compose/components/compose_form.jsx
index a71f5b0fd..bcc4fe1e7 100644
--- a/app/assets/javascripts/components/features/compose/components/compose_form.jsx
+++ b/app/assets/javascripts/components/features/compose/components/compose_form.jsx
@@ -83,10 +83,6 @@ const ComposeForm = React.createClass({
     this.props.onChangeSpoilerText(e.target.value);
   },
 
-  onPaste (files) {
-    this.props.onPaste(files);
-  },
-
   componentDidUpdate (prevProps) {
     if (this.props.focusDate !== prevProps.focusDate) {
       // 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 () {
-    const { intl, needsPrivacyWarning, mentionedDomains } = this.props;
+    const { intl, needsPrivacyWarning, mentionedDomains, onPaste } = this.props;
     const disabled = this.props.is_submitting || this.props.is_uploading;
 
     let publishText    = '';
@@ -154,7 +150,7 @@ const ComposeForm = React.createClass({
           onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
           onSuggestionsClearRequested={this.onSuggestionsClearRequested}
           onSuggestionSelected={this.onSuggestionSelected}
-          onPaste={this.onPaste}
+          onPaste={onPaste}
         />
 
         <div style={{ marginTop: '10px', overflow: 'hidden' }}>