From 63219bed2c0b5e3fe9cb5ef99337aa807a15bfd1 Mon Sep 17 00:00:00 2001 From: "longhe.li" Date: Fri, 7 Jul 2023 14:46:19 +0800 Subject: [PATCH] fix: the page bounce when switching routes --- src/App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index e91f9b2..d089d3e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,7 +11,7 @@ if (G_ID) { } const App = () => { - const Views = () => useRoutes(routes); + const views = useRoutes(routes); const location = useLocation(); useEffect(() => { @@ -23,7 +23,7 @@ const App = () => { return ( }> - + {views} ); };