browserOSIcons.tsx 985 B

123456789101112131415161718192021222324252627282930313233
  1. import {Fragment} from 'react';
  2. import ContextIcon from 'sentry/components/replays/contextIcon';
  3. import {useReplayContext} from 'sentry/components/replays/replayContext';
  4. import {Tooltip} from 'sentry/components/tooltip';
  5. export default function BrowserOSIcons() {
  6. const {replay} = useReplayContext();
  7. const replayRecord = replay?.getReplay();
  8. return (
  9. <Fragment>
  10. <Tooltip title={`${replayRecord?.os.name ?? ''} ${replayRecord?.os.version ?? ''}`}>
  11. <ContextIcon
  12. name={replayRecord?.os.name ?? ''}
  13. version={replayRecord?.os.version ?? undefined}
  14. showVersion
  15. />
  16. </Tooltip>
  17. <Tooltip
  18. title={`${replayRecord?.browser.name ?? ''} ${
  19. replayRecord?.browser.version ?? ''
  20. }`}
  21. >
  22. <ContextIcon
  23. name={replayRecord?.browser.name ?? ''}
  24. version={replayRecord?.browser.version ?? undefined}
  25. showVersion
  26. />
  27. </Tooltip>
  28. </Fragment>
  29. );
  30. }