Skip to content

Commit d90495c

Browse files
committed
chore: delete url param
1 parent 7cd75e9 commit d90495c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

chat2db-client/src/pages/main/index.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ function MainPage(props: IProps) {
144144
}
145145
}
146146

147-
const urlTab = getUrlParam('tab');
148-
const initPage = urlTab || localStorage.getItem('curPage');
147+
const initPage = localStorage.getItem('curPage');
149148
const initPageIndex = navConfig.findIndex((t) => `${t.key}` === initPage);
150149
const activeIndex = initPageIndex > -1 ? initPageIndex : 2;
151150
navConfig[activeIndex].isLoad = true;
@@ -156,8 +155,6 @@ function MainPage(props: IProps) {
156155
if (item.openBrowser) {
157156
window.open(item.openBrowser, '_blank');
158157
} else {
159-
const newURL = updateQueryStringParameter('tab', item.key);
160-
history.pushState({}, '', newURL);
161158
setActiveNav(item);
162159
}
163160
};

0 commit comments

Comments
 (0)