replayList.ts 928 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. os: {
  21. name: 'sentry.javascript.react',
  22. version: '7.42.0',
  23. },
  24. project_id: '2',
  25. started_at: new Date('2022-09-15T06:50:03+00:00'),
  26. urls: [],
  27. user: {
  28. display_name: 'testDisplayName',
  29. email: '',
  30. id: '147086',
  31. ip: '127.0.0.1',
  32. username: 'testDisplayName',
  33. },
  34. },
  35. ];
  36. }