about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/composer
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-12-26 16:54:28 -0800
committerkibigo! <marrus-sh@users.noreply.github.com>2018-01-04 18:21:59 -0800
commit3c29f5740447270a4122b334281a907ecbdd4165 (patch)
treedd3daba631f2eddf0ede5af76b8e29eda8874854 /app/javascript/flavours/glitch/features/composer
parent924ffe81d477a8cf890c8117efb94b908760bccc (diff)
WIP <Compose> Refactor; <Drawer> ed.
Diffstat (limited to 'app/javascript/flavours/glitch/features/composer')
-rw-r--r--app/javascript/flavours/glitch/features/composer/index.js15
-rw-r--r--app/javascript/flavours/glitch/features/composer/options/dropdown/index.js2
2 files changed, 8 insertions, 9 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/index.js b/app/javascript/flavours/glitch/features/composer/index.js
index 25c2622d8..506c668a7 100644
--- a/app/javascript/flavours/glitch/features/composer/index.js
+++ b/app/javascript/flavours/glitch/features/composer/index.js
@@ -2,9 +2,6 @@
 import PropTypes from 'prop-types';
 import React from 'react';
 import ImmutablePropTypes from 'react-immutable-proptypes';
-import { injectIntl } from 'react-intl';
-import { connect } from 'react-redux';
-import { withRouter } from 'react-router';
 
 //  Actions.
 import {
@@ -43,7 +40,7 @@ import { countableText } from 'flavours/glitch/util/counter';
 import { me } from 'flavours/glitch/util/initial_state';
 import { isMobile } from 'flavours/glitch/util/is_mobile';
 import { assignHandlers } from 'flavours/glitch/util/react_helpers';
-import { mergeProps } from 'flavours/glitch/util/redux_helpers';
+import { wrap } from 'flavours/glitch/util/redux_helpers';
 
 //  State mapping.
 function mapStateToProps (state) {
@@ -204,9 +201,7 @@ const handlers = {
 };
 
 //  The component.
-@injectIntl
-@connect(mapStateToProps, mapDispatchToProps, mergeProps)
-export default class Composer extends React.Component {
+class Composer extends React.Component {
 
   //  Constructor.
   constructor (props) {
@@ -408,7 +403,7 @@ export default class Composer extends React.Component {
 //  Context
 Composer.contextTypes = {
   history: PropTypes.object,
-}
+};
 
 //  Props.
 Composer.propTypes = {
@@ -438,3 +433,7 @@ Composer.propTypes = {
     text: PropTypes.string,
   }).isRequired,
 };
+
+//  Connecting and export.
+export { Composer as WrappedComponent };
+export default wrap(Composer, mapStateToProps, mapDispatchToProps, true);
diff --git a/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js b/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js
index 0f304bc88..ee52008a7 100644
--- a/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js
+++ b/app/javascript/flavours/glitch/features/composer/options/dropdown/index.js
@@ -70,7 +70,7 @@ const handlers = {
     //  dropdown.
     if (onModalClose && isUserTouching()) {
       if (open) {
-        onModalClose()
+        onModalClose();
       } else if (onChange && onModalOpen) {
         onModalOpen({
           actions: items.map(