Skip to content

Commit

Permalink
chore: delete url param
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryFan626 committed Nov 13, 2023
1 parent 7cd75e9 commit d90495c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions chat2db-client/src/pages/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
};
Expand Down

0 comments on commit d90495c

Please sign in to comment.