fix: global time navigation is fixed (#2533)

This commit is contained in:
Palash Gupta 2023-04-03 13:30:48 +05:30 committed by GitHub
parent 61a1d04252
commit 20b1f96c19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,6 @@ function SideNav(): JSX.Element {
const [collapsed, setCollapsed] = useState<boolean>( const [collapsed, setCollapsed] = useState<boolean>(
getLocalStorageKey(IS_SIDEBAR_COLLAPSED) === 'true', getLocalStorageKey(IS_SIDEBAR_COLLAPSED) === 'true',
); );
const { search } = useLocation();
const { currentVersion, latestVersion, isCurrentVersionError } = useSelector< const { currentVersion, latestVersion, isCurrentVersionError } = useSelector<
AppState, AppState,
AppReducer AppReducer
@ -48,15 +47,11 @@ function SideNav(): JSX.Element {
const onClickHandler = useCallback( const onClickHandler = useCallback(
(to: string) => { (to: string) => {
const queryParams = new URLSearchParams(search);
const url = queryParams.toString();
if (pathname !== to) { if (pathname !== to) {
history.push(`${to}?${url}`); history.push(`${to}`);
} }
}, },
[pathname, search], [pathname],
); );
const onClickSlackHandler = (): void => { const onClickSlackHandler = (): void => {