import type {Query} from 'history'; import type {DomainView} from 'sentry/views/insights/pages/useFilters'; import {getTransactionSummaryBaseUrl} from 'sentry/views/performance/transactionSummary/utils'; export function replaysRouteWithQuery({ orgSlug, transaction, projectID, query, view, }: { orgSlug: string; query: Query; transaction: string; projectID?: string | string[]; view?: DomainView; }) { const pathname = `${getTransactionSummaryBaseUrl(orgSlug, view)}/replays/`; return { pathname, query: { transaction, project: projectID, environment: query.environment, statsPeriod: query.statsPeriod, start: query.start, end: query.end, query: query.query, }, }; }