focusArea.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import useActiveReplayTab, {TabKey} from 'sentry/utils/replays/hooks/useActiveReplayTab';
  2. import A11y from 'sentry/views/replays/detail/accessibility/index';
  3. import Breadcrumbs from 'sentry/views/replays/detail/breadcrumbs';
  4. import Console from 'sentry/views/replays/detail/console';
  5. import ErrorList from 'sentry/views/replays/detail/errorList/index';
  6. import MemoryPanel from 'sentry/views/replays/detail/memoryPanel/index';
  7. import NetworkList from 'sentry/views/replays/detail/network';
  8. import PerfTable from 'sentry/views/replays/detail/perfTable/index';
  9. import TagPanel from 'sentry/views/replays/detail/tagPanel';
  10. import Trace from 'sentry/views/replays/detail/trace/index';
  11. export default function FocusArea() {
  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.MEMORY:
  25. return <MemoryPanel />;
  26. case TabKey.CONSOLE:
  27. return <Console />;
  28. case TabKey.TAGS:
  29. return <TagPanel />;
  30. case TabKey.BREADCRUMBS:
  31. default: {
  32. return <Breadcrumbs />;
  33. }
  34. }
  35. }