replayList.ts 1010 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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_dead_clicks: 0,
  17. count_rage_clicks: 0,
  18. count_errors: 0,
  19. duration: duration(30000),
  20. finished_at: new Date('2022-09-15T06:54:00+00:00'),
  21. id: '346789a703f6454384f1de473b8b9fcc',
  22. is_archived: false,
  23. os: {
  24. name: 'sentry.javascript.react',
  25. version: '7.42.0',
  26. },
  27. project_id: '2',
  28. started_at: new Date('2022-09-15T06:50:03+00:00'),
  29. urls: [],
  30. user: {
  31. display_name: 'testDisplayName',
  32. email: '',
  33. id: '147086',
  34. ip: '127.0.0.1',
  35. username: 'testDisplayName',
  36. },
  37. },
  38. ];
  39. }