1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00
onion/js/history.js

14 lines
414 B
JavaScript

'use strict';
import { useRouterHistory } from 'react-router';
import { useQueries } from 'history';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import AppConstants from './constants/application_constants';
// Remove the trailing slash if present
let basename = AppConstants.baseUrl.replace(/\/$/, '');
export default useRouterHistory(useQueries(createBrowserHistory))({ basename });