From 5a1d4ee45b6330b50835ca6cd4cb4255afab5b00 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 15:54:08 +0000 Subject: [PATCH] Refactor: Fix Router context error --- src/App.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 {