utils.ts 551 B

12345678910111213141516171819202122232425262728
  1. import type {Query} from 'history';
  2. export function replaysRouteWithQuery({
  3. orgSlug,
  4. transaction,
  5. projectID,
  6. query,
  7. }: {
  8. orgSlug: string;
  9. query: Query;
  10. transaction: string;
  11. projectID?: string | string[];
  12. }) {
  13. const pathname = `/organizations/${orgSlug}/performance/summary/replays/`;
  14. return {
  15. pathname,
  16. query: {
  17. transaction,
  18. project: projectID,
  19. environment: query.environment,
  20. statsPeriod: query.statsPeriod,
  21. start: query.start,
  22. end: query.end,
  23. query: query.query,
  24. },
  25. };
  26. }