From f343e04e3a77e4b9988d1cfd5d5c2f7cc5524d2e Mon Sep 17 00:00:00 2001 From: Michael Sun <55160142+MichaelSun48@users.noreply.github.com> Date: Tue, 3 Sep 2024 18:38:01 -0400 Subject: [PATCH] fix(custom-views): Fix broken back-navigation when hitting issues (#76894) This PR fixes an issue where you would not be able to navigate backwards after clicking on "Issues" in the sentry sidebar. --- .../app/views/issueList/customViewsHeader.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/static/app/views/issueList/customViewsHeader.tsx b/static/app/views/issueList/customViewsHeader.tsx index 24d9a13d238e2..af742960879b9 100644 --- a/static/app/views/issueList/customViewsHeader.tsx +++ b/static/app/views/issueList/customViewsHeader.tsx @@ -165,15 +165,18 @@ function CustomViewsIssueListHeaderTabsContent({ useEffect(() => { // If no query, sort, or viewId is present, set the first tab as the selected tab, update query accordingly if (!query && !sort && !viewId) { - navigate({ - ...location, - query: { - ...queryParams, - query: draggableTabs[0].query, - sort: draggableTabs[0].querySort, - viewId: draggableTabs[0].id, + navigate( + { + ...location, + query: { + ...queryParams, + query: draggableTabs[0].query, + sort: draggableTabs[0].querySort, + viewId: draggableTabs[0].id, + }, }, - }); + {replace: true} + ); tabListState?.setSelectedKey(draggableTabs[0].key); return; }