1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00
onion/js/history.js
2016-02-01 10:18:30 +01:00

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;