import React, { useEffect } from 'react'; import Dash from './index' import SourcesModal from './stats/modals/sources' import ReferrersDrilldownModal from './stats/modals/referrer-drilldown' import GoogleKeywordsModal from './stats/modals/google-keywords' import PagesModal from './stats/modals/pages' import CountriesModal from './stats/modals/countries' import {BrowserRouter, Switch, Route, useLocation} from "react-router-dom"; function ScrollToTop() { const location = useLocation(); useEffect(() => { if (location.state && location.state.scrollTop) { window.scrollTo(0, 0); } }, [location]); return null; } export default function Router({site, loggedIn}) { return ( ); }