From 4b434fada4958c15b0d0c7340334b4e0f5af7e00 Mon Sep 17 00:00:00 2001 From: Space-Banane Date: Fri, 13 Mar 2026 23:57:08 +0100 Subject: [PATCH] fix linting issues --- src/App.tsx | 4 ++-- src/components/Navbar.tsx | 3 ++- src/sections/Footer.tsx | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 7899f57..a131a77 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -128,7 +128,7 @@ function App() { } else { setDisplayMessage(targetMessage); } - }, [messageIndex, isScrambling]); + }, [messageIndex, isScrambling, characters, rotatingMessages]); // Rotating message effect useEffect(() => { @@ -140,7 +140,7 @@ function App() { return () => { clearInterval(messageInterval); }; - }, []); + }, [rotatingMessages.length]); // Fetch data from API on mount useEffect(() => { diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 9d88c5e..35a9d66 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -3,6 +3,7 @@ import { Link, useLocation } from "react-router-dom"; export function Navbar() { const location = useLocation(); + const { track } = useUmami(); const navItems = [ { label: "Home", path: "/" }, @@ -11,7 +12,7 @@ export function Navbar() { ]; const handleSwitch = (path: string) => { - useUmami().track("nav_to_" + path.replaceAll("/", "_")); + track("nav_to_" + path.replaceAll("/", "_")); }; return ( diff --git a/src/sections/Footer.tsx b/src/sections/Footer.tsx index 5a11722..827cbe3 100644 --- a/src/sections/Footer.tsx +++ b/src/sections/Footer.tsx @@ -3,9 +3,10 @@ import { Github, Mail, MessageSquare } from "lucide-react"; export function Footer() { const currentYear = new Date().getFullYear(); + const { track } = useUmami(); const handleLinkClick = (name: string, url: string) => { - useUmami().track(`footer_click_${name.toLowerCase()}`, { url }); + track(`footer_click_${name.toLowerCase()}`, { url }); }; return (