mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
19 lines
490 B
JavaScript
19 lines
490 B
JavaScript
'use strict';
|
|
|
|
import useBasename from 'history/lib/useBasename';
|
|
import useQueries from 'history/lib/useQueries';
|
|
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
|
import AppConstants from './constants/application_constants';
|
|
|
|
|
|
// Remove the trailing slash if present
|
|
const baseUrl = AppConstants.baseUrl.replace(/\/$/, '');
|
|
|
|
const history = useBasename(useQueries(createBrowserHistory))({
|
|
basename: baseUrl
|
|
});
|
|
|
|
history.locationQueue = [];
|
|
|
|
export default history;
|