From 89efce89f45a7a612d3c474890483f25575a07e3 Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Mon, 26 Aug 2024 10:31:06 -0400 Subject: [PATCH] ref(js): Make projectIssues compatible with react-router 6 (#76448) --- static/app/views/projectDetail/projectIssues.spec.tsx | 6 +++--- static/app/views/projectDetail/projectIssues.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/static/app/views/projectDetail/projectIssues.spec.tsx b/static/app/views/projectDetail/projectIssues.spec.tsx index c60a01076c4fdb..df434b83b8369e 100644 --- a/static/app/views/projectDetail/projectIssues.spec.tsx +++ b/static/app/views/projectDetail/projectIssues.spec.tsx @@ -95,7 +95,7 @@ describe('ProjectDetail > ProjectIssues', function () { expect(router.push).toHaveBeenCalledWith({ pathname: '/organizations/org-slug/issues/', query: { - limit: 5, + limit: '5', query: 'error.unhandled:true is:unresolved', sort: 'freq', statsPeriod: '14d', @@ -158,7 +158,7 @@ describe('ProjectDetail > ProjectIssues', function () { field: ['issue', 'title', 'count()', 'count_unique(user)', 'project'], name: 'Frequent Unhandled Issues', query: 'event.type:error error.unhandled:true', - sort: ['-count'], + sort: '-count', statsPeriod: '14d', }, }); @@ -188,7 +188,7 @@ describe('ProjectDetail > ProjectIssues', function () { expect(router.push).toHaveBeenCalledWith({ pathname: `/organizations/${organization.slug}/issues/`, query: { - limit: 5, + limit: '5', environment: 'staging', statsPeriod: '7d', query: 'error.unhandled:true is:unresolved', diff --git a/static/app/views/projectDetail/projectIssues.tsx b/static/app/views/projectDetail/projectIssues.tsx index ac900873120794..51fb30c4e275a5 100644 --- a/static/app/views/projectDetail/projectIssues.tsx +++ b/static/app/views/projectDetail/projectIssues.tsx @@ -152,7 +152,7 @@ function ProjectIssues({organization, location, projectId, query, api}: Props) { query: { name: t('Frequent Unhandled Issues'), field: ['issue', 'title', 'count()', 'count_unique(user)', 'project'], - sort: ['-count'], + sort: '-count', query: discoverQuery, display: 'top5', ...normalizeDateTimeParams(pick(location.query, [...Object.values(URL_PARAM)])), @@ -168,7 +168,7 @@ function ProjectIssues({organization, location, projectId, query, api}: Props) { : [`${IssuesQuery.ALL}`, query].join(' ').trim(); const queryParams = { - limit: 5, + limit: '5', ...normalizeDateTimeParams( pick(location.query, [...Object.values(URL_PARAM), 'cursor']) ),