diff --git a/src/App.tsx b/src/App.tsx index 66d22d44..5eaf774a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -104,7 +104,8 @@ const queryClient = new QueryClient({ }, }); -function AppContent(): React.JSX.Element { +// Navigation tracking component - must be inside Router context +function NavigationTracker() { const location = useLocation(); const prevLocation = useRef(''); @@ -114,9 +115,13 @@ function AppContent(): React.JSX.Element { prevLocation.current = location.pathname; }, [location.pathname]); + return null; +} + +function AppContent(): React.JSX.Element { return ( - + @@ -362,8 +367,7 @@ function AppContent(): React.JSX.Element {