From 829f7805fca7fffc0c60d3e5ddddd4ce58a79804 Mon Sep 17 00:00:00 2001 From: majakomel Date: Wed, 29 May 2024 10:06:59 +0200 Subject: [PATCH] Add event tracking to NavBar --- components/NavBar.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/NavBar.js b/components/NavBar.js index 7028efcb..d3e4e20b 100644 --- a/components/NavBar.js +++ b/components/NavBar.js @@ -53,7 +53,7 @@ appearance: none; } ` -const NavItem = ({ label, href }) => { +const NavItem = ({ label, href, ...rest }) => { const { pathname } = useRouter() const [isActive, setIsActive] = useState(false) @@ -62,7 +62,7 @@ const NavItem = ({ label, href }) => { }, [pathname, href]) return ( - {label} + {label} ) } @@ -168,13 +168,13 @@ export const NavBar = ({ color }) => { )} - } href="/search" /> - } href="/chart/mat" /> - } href="/chart/circumvention" /> - } href="/countries" /> - } href="/networks" /> - } href="/domains" /> - } href="/findings" /> + } href="/search" data-umami-event="navigation-search" /> + } href="/chart/mat" data-umami-event="navigation-mat" /> + } href="/chart/circumvention" data-umami-event="navigation-circumvention" /> + } href="/countries" data-umami-event="navigation-countries" /> + } href="/networks" data-umami-event="navigation-networks" /> + } href="/domains" data-umami-event="navigation-domains" /> + } href="/findings" data-umami-event="navigation-findings" /> {user?.logged_in && ( )}