import { useEffect } from "react"; import { NavLink, Outlet, useLocation } from "react-router-dom"; import { OnlineCounter } from "./OnlineCounter.js"; import { CookieConsent } from "./CookieConsent.js"; import { FeedbackWidget } from "./FeedbackWidget.js"; import { trackVisit } from "../lib/analytics.js"; const linkClass = ({ isActive }: { isActive: boolean }) => `px-3 py-1.5 rounded text-sm ${isActive ? "bg-accent text-white" : "text-slate-300 hover:bg-white/5"}`; export function Layout() { const location = useLocation(); useEffect(() => { trackVisit(location.pathname); // eslint-disable-next-line react-hooks/exhaustive-deps }, [location.pathname]); return (
); }