Move DragDropContext to wrap entire app

pull/21833/head
Luke Barnard 2017-12-06 13:10:58 +00:00
parent a8a650c24a
commit 7aa5dcef69
2 changed files with 6 additions and 4 deletions

View File

@ -19,6 +19,8 @@ limitations under the License.
import Promise from 'bluebird';
import React from 'react';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import Matrix from "matrix-js-sdk";
import Analytics from "../../Analytics";
@ -84,7 +86,7 @@ const ONBOARDING_FLOW_STARTERS = [
'view_create_group',
];
module.exports = React.createClass({
const MatrixChat = React.createClass({
// we export this so that the integration tests can use it :-S
statics: {
VIEWS: VIEWS,
@ -1584,3 +1586,5 @@ module.exports = React.createClass({
console.error(`Unknown view ${this.state.view}`);
},
});
export default DragDropContext(HTML5Backend)(MatrixChat);

View File

@ -15,8 +15,6 @@ limitations under the License.
*/
import React from 'react';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import PropTypes from 'prop-types';
import { MatrixClient } from 'matrix-js-sdk';
import FilterStore from '../../stores/FilterStore';
@ -126,4 +124,4 @@ const TagPanel = React.createClass({
</div>;
},
});
export default DragDropContext(HTML5Backend)(TagPanel);
export default TagPanel;