import { useLocation, Routes, Route, Link } from "react-router-dom"; import { useState, lazy, Suspense } from "react"; import useFetch from "./useFetch"; import { DateTime } from "luxon"; import "./App.css"; const Index = lazy(() => import("./pages/Index")); const Graph = lazy(() => import("./pages/Graph")); import { useEffect } from "react"; const App = () => { const url = localStorage.getItem("url") ?? "/data.json"; let routerLocation = useLocation(); useEffect(() => { !window.goatcounter ?? window.goatcounter.count({ path: location.pathname + location.search + location.hash, }); }, [routerLocation]); const response = useFetch(url); const [timeDifference, setTimeDifference] = useState(1); return (