Fix deprecated use of createBrowserHistory

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Thibaut Girka 2020-04-09 16:12:28 +02:00 committed by ThibG
parent c47be5bd86
commit 5d2cdeb225
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,5 @@
// This file will be loaded on public pages, regardless of theme.
import createHistory from 'history/createBrowserHistory';
import ready from '../mastodon/ready';
const { delegate } = require('@rails/ujs');

View File

@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import 'wicg-inert';
import createHistory from 'history/createBrowserHistory';
import { createBrowserHistory } from 'history';
export default class ModalRoot extends React.PureComponent {
static contextTypes = {
@ -51,7 +51,7 @@ export default class ModalRoot extends React.PureComponent {
componentDidMount () {
window.addEventListener('keyup', this.handleKeyUp, false);
window.addEventListener('keydown', this.handleKeyDown, false);
this.history = this.context.router ? this.context.router.history : createHistory();
this.history = this.context.router ? this.context.router.history : createBrowserHistory();
}
componentWillReceiveProps (nextProps) {