From d90495cd09c4b950f68947419acef2e789a5c438 Mon Sep 17 00:00:00 2001 From: Jerry Fan Date: Mon, 13 Nov 2023 20:45:25 +0800 Subject: [PATCH] chore: delete url param --- chat2db-client/src/pages/main/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/chat2db-client/src/pages/main/index.tsx b/chat2db-client/src/pages/main/index.tsx index 236a2e14c..4e832f04a 100644 --- a/chat2db-client/src/pages/main/index.tsx +++ b/chat2db-client/src/pages/main/index.tsx @@ -144,8 +144,7 @@ function MainPage(props: IProps) { } } - const urlTab = getUrlParam('tab'); - const initPage = urlTab || localStorage.getItem('curPage'); + const initPage = localStorage.getItem('curPage'); const initPageIndex = navConfig.findIndex((t) => `${t.key}` === initPage); const activeIndex = initPageIndex > -1 ? initPageIndex : 2; navConfig[activeIndex].isLoad = true; @@ -156,8 +155,6 @@ function MainPage(props: IProps) { if (item.openBrowser) { window.open(item.openBrowser, '_blank'); } else { - const newURL = updateQueryStringParameter('tab', item.key); - history.pushState({}, '', newURL); setActiveNav(item); } };