mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-12 22:25:10 +01:00
Fix deprecated use of createBrowserHistory
This commit is contained in:
parent
c47be5bd86
commit
5d2cdeb225
@ -1,6 +1,5 @@
|
|||||||
// This file will be loaded on public pages, regardless of theme.
|
// This file will be loaded on public pages, regardless of theme.
|
||||||
|
|
||||||
import createHistory from 'history/createBrowserHistory';
|
|
||||||
import ready from '../mastodon/ready';
|
import ready from '../mastodon/ready';
|
||||||
|
|
||||||
const { delegate } = require('@rails/ujs');
|
const { delegate } = require('@rails/ujs');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import 'wicg-inert';
|
import 'wicg-inert';
|
||||||
import createHistory from 'history/createBrowserHistory';
|
import { createBrowserHistory } from 'history';
|
||||||
|
|
||||||
export default class ModalRoot extends React.PureComponent {
|
export default class ModalRoot extends React.PureComponent {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
@ -51,7 +51,7 @@ export default class ModalRoot extends React.PureComponent {
|
|||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
window.addEventListener('keyup', this.handleKeyUp, false);
|
window.addEventListener('keyup', this.handleKeyUp, false);
|
||||||
window.addEventListener('keydown', this.handleKeyDown, 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) {
|
componentWillReceiveProps (nextProps) {
|
||||||
|
Loading…
Reference in New Issue
Block a user