fix: goatcounter onload error

pull/1/head
Antonio De Lucreziis 2 years ago
parent a236c662af
commit d3d1bb24d7

@ -33,11 +33,14 @@ export const App = ({ url }: { url?: string }) => {
const pbu = useContext(ServerContext) ? (s: string) => s : prependBaseUrl const pbu = useContext(ServerContext) ? (s: string) => s : prependBaseUrl
const handleRouteChange = () => { const handleRouteChange = () => {
// @ts-ignore
if (window.goatcounter) {
// @ts-ignore // @ts-ignore
window.goatcounter.count({ window.goatcounter.count({
path: location.pathname + location.search + location.hash, path: location.pathname + location.search + location.hash,
}) })
} }
}
return ( return (
<UserProvider> <UserProvider>

Loading…
Cancel
Save