import { createBrowserHistory } from 'history' ; import analytics from '../analytics/analytics' ; import { PKG_DETAIL_PATH } from './data' ; import updateMetaIndex from './updateMetaIndex' ; import notificationsDispatcher from './userNotificationsDispatcher' ; const history = createBrowserHistory ( ) ; history . listen ( ( location ) => { if ( ! PKG_DETAIL_PATH . test ( location . pathname ) ) { updateMetaIndex ( ) ; } analytics . page ( ) ; notificationsDispatcher . dismissNotification ( location . pathname ) ; } ) ; export default history ;