mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Comply to react-router's history changes
This commit is contained in:
parent
20f2836aed
commit
d0586c937d
@ -1,13 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
import useBasename from 'history/lib/useBasename';
|
||||
import { useRouterHistory } from 'react-router';
|
||||
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
||||
|
||||
import AppConstants from './constants/application_constants';
|
||||
|
||||
|
||||
// Remove the trailing slash if present
|
||||
let baseUrl = AppConstants.baseUrl.replace(/\/$/, '');
|
||||
let basename = AppConstants.baseUrl.replace(/\/$/, '');
|
||||
|
||||
export default useBasename(createBrowserHistory)({
|
||||
basename: baseUrl
|
||||
});
|
||||
export default useRouterHistory(createBrowserHistory)({ basename });
|
||||
|
Loading…
Reference in New Issue
Block a user