2015-10-05 11:52:23 +02:00
|
|
|
'use strict';
|
|
|
|
|
2016-01-25 14:50:55 +01:00
|
|
|
import { useRouterHistory } from 'react-router';
|
2016-05-09 12:12:48 +02:00
|
|
|
import { useQueries } from 'history';
|
2015-10-05 11:52:23 +02:00
|
|
|
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
2016-01-25 14:50:55 +01:00
|
|
|
|
2015-10-13 14:19:08 +02:00
|
|
|
import AppConstants from './constants/application_constants';
|
2015-10-05 11:52:23 +02:00
|
|
|
|
2015-10-13 14:19:08 +02:00
|
|
|
|
|
|
|
// Remove the trailing slash if present
|
2016-01-25 14:50:55 +01:00
|
|
|
let basename = AppConstants.baseUrl.replace(/\/$/, '');
|
2015-10-13 14:19:08 +02:00
|
|
|
|
2016-05-09 12:12:48 +02:00
|
|
|
export default useRouterHistory(useQueries(createBrowserHistory))({ basename });
|