fix: goatcounter onload error
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user