0
0
Fork 0

Upgrade React Router (#3677)

* chore(yarn): Remove react-router

* chore(yarn): Remove react-router-scroll

* chore(yarn): Remove history

* chore(yarn): Add react-router-dom

* chore: Remove usages of react-router-scroll

* refactor: Upgrade to react-router-web

* refactor: Use fork of react-router-scroll

This reverts commit 2ddea9a6c8d39fc64b7d0b587f3fbda7a45a7fa2.

* fix: Issues mentions in the PR feedback
This commit is contained in:
Sorin Davidoi 2017-06-20 20:40:03 +02:00 committed by Eugen Rochko
parent 1fc6cb4997
commit 8f03fdce7f
28 changed files with 186 additions and 130 deletions

View file

@ -50,12 +50,12 @@ class ActionBar extends React.PureComponent {
}
handleMentionClick = () => {
this.props.onMention(this.props.status.get('account'), this.context.router);
this.props.onMention(this.props.status.get('account'), this.context.router.history);
}
handleReport = () => {
this.props.onReport(this.props.status);
this.context.router.push('/report');
this.context.router.history.push('/report');
}
render () {

View file

@ -7,7 +7,7 @@ import StatusContent from '../../../components/status_content';
import MediaGallery from '../../../components/media_gallery';
import VideoPlayer from '../../../components/video_player';
import AttachmentList from '../../../components/attachment_list';
import Link from 'react-router/lib/Link';
import Link from 'react-router-dom/Link';
import { FormattedDate, FormattedNumber } from 'react-intl';
import CardContainer from '../containers/card_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
@ -28,7 +28,7 @@ class DetailedStatus extends ImmutablePureComponent {
handleAccountClick = (e) => {
if (e.button === 0) {
e.preventDefault();
this.context.router.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);
this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);
}
e.stopPropagation();