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); } };