|
|
|
@ -32,9 +32,16 @@ export const App = ({ url }: { url?: string }) => {
|
|
|
|
|
// during server side rendering don't prepend the BASE_URL
|
|
|
|
|
const pbu = useContext(ServerContext) ? (s: string) => s : prependBaseUrl
|
|
|
|
|
|
|
|
|
|
const handleRouteChange = () => {
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
window.goatcounter.count({
|
|
|
|
|
path: location.pathname + location.search + location.hash,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<UserProvider>
|
|
|
|
|
<Router url={url}>
|
|
|
|
|
<Router url={url} onChange={handleRouteChange}>
|
|
|
|
|
<HomePage
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
path={pbu('/')}
|
|
|
|
|