From 88cfd47a2032afcdfed6fb408b2c17c8f2ec4768 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 11 Sep 2019 10:02:24 +0200 Subject: [PATCH] Migration d'un import de history MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supprime le message de warning dans la console au démarrage --- source/Provider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Provider.js b/source/Provider.js index 1cab5bc32..681260b33 100644 --- a/source/Provider.js +++ b/source/Provider.js @@ -1,7 +1,7 @@ import { ThemeColoursProvider } from 'Components/utils/withColours' import { SitePathProvider } from 'Components/utils/withSitePaths' import { TrackerProvider } from 'Components/utils/withTracker' -import createHistory from 'history/createBrowserHistory' +import { createBrowserHistory } from 'history' import i18next from 'i18next' import React, { PureComponent } from 'react' import { I18nextProvider } from 'react-i18next' @@ -35,7 +35,7 @@ if ( export default class Provider extends PureComponent { constructor(props) { super(props) - this.history = createHistory({ + this.history = createBrowserHistory({ basename: process.env.NODE_ENV === 'production' ? '' : this.props.basename }) this.props.tracker?.connectToHistory(this.history)