focusArea.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import useActiveReplayTab, {TabKey} from 'sentry/utils/replays/hooks/useActiveReplayTab';
  2. import A11y from 'sentry/views/replays/detail/accessibility/index';
  3. import Console from 'sentry/views/replays/detail/console';
  4. import DomMutations from 'sentry/views/replays/detail/domMutations';
  5. import ErrorList from 'sentry/views/replays/detail/errorList/index';
  6. import MemoryChart from 'sentry/views/replays/detail/memoryChart';
  7. import NetworkList from 'sentry/views/replays/detail/network';
  8. import PerfTable from 'sentry/views/replays/detail/perfTable/index';
  9. import Trace from 'sentry/views/replays/detail/trace/index';
  10. type Props = {};
  11. function FocusArea({}: Props) {
  12. const {getActiveTab} = useActiveReplayTab();
  13. switch (getActiveTab()) {
  14. case TabKey.A11Y:
  15. return <A11y />;
  16. case TabKey.NETWORK:
  17. return <NetworkList />;
  18. case TabKey.TRACE:
  19. return <Trace />;
  20. case TabKey.PERF:
  21. return <PerfTable />;
  22. case TabKey.ERRORS:
  23. return <ErrorList />;
  24. case TabKey.DOM:
  25. return <DomMutations />;
  26. case TabKey.MEMORY:
  27. return <MemoryChart />;
  28. case TabKey.CONSOLE:
  29. default: {
  30. return <Console />;
  31. }
  32. }
  33. }
  34. export default FocusArea;