upgraded to react router v4

This commit is contained in:
Jori Lallo
2017-05-17 00:11:13 -07:00
parent f70e2326c0
commit b25298c8f1
23 changed files with 245 additions and 230 deletions

View File

@ -1,6 +1,6 @@
/* eslint-disable */
import React from 'react';
import history from 'utils/History';
import styles from './Tree.scss';
import classNames from 'classnames/bind';
const cx = classNames.bind(styles);
@ -60,6 +60,7 @@ class Node extends React.Component {
paddingLeft={this.props.paddingLeft}
onCollapse={this.props.onCollapse}
onDragStart={this.props.onDragStart}
history={this.props.history}
/>
);
})}
@ -77,8 +78,7 @@ class Node extends React.Component {
onClick = () => {
const index = this.props.index;
const node = index.node;
if (!this.isModifying()) history.push(node.url);
if (!this.isModifying()) this.props.history.push(node.url);
};
render() {