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

13 lines
364 B
JavaScript
Raw Normal View History

'use strict';
import { useRouterHistory } from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
2015-10-13 14:19:08 +02:00
import AppConstants from './constants/application_constants';
2015-10-13 14:19:08 +02:00
// Remove the trailing slash if present
let basename = AppConstants.baseUrl.replace(/\/$/, '');
2015-10-13 14:19:08 +02:00
export default useRouterHistory(createBrowserHistory)({ basename });