import { createBrowserHistory } from 'history' ; const history = createBrowserHistory ( ) ; history . listen ( ( location ) => { setTimeout ( ( ) => { if ( location . action === 'POP' ) { return ; } window . scrollTo ( 0 , 0 ) ; } ) ; } ) ; export default history ;