replayList.ts 954 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {duration} from 'moment';
  2. import type {ReplayListRecord as TReplayListRecord} from 'sentry/views/replays/types';
  3. export function ReplayList(
  4. replayListRecords: TReplayListRecord[] = []
  5. ): TReplayListRecord[] {
  6. if (replayListRecords.length) {
  7. return replayListRecords;
  8. }
  9. return [
  10. {
  11. activity: 1,
  12. browser: {
  13. name: 'Firefox',
  14. version: '111.0',
  15. },
  16. count_errors: 0,
  17. duration: duration(30000),
  18. finished_at: new Date('2022-09-15T06:54:00+00:00'),
  19. id: '346789a703f6454384f1de473b8b9fcc',
  20. is_archived: false,
  21. os: {
  22. name: 'sentry.javascript.react',
  23. version: '7.42.0',
  24. },
  25. project_id: '2',
  26. started_at: new Date('2022-09-15T06:50:03+00:00'),
  27. urls: [],
  28. user: {
  29. display_name: 'testDisplayName',
  30. email: '',
  31. id: '147086',
  32. ip: '127.0.0.1',
  33. username: 'testDisplayName',
  34. },
  35. },
  36. ];
  37. }