focusArea.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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 TagPanel from 'sentry/views/replays/detail/tagPanel';
  9. import Trace from 'sentry/views/replays/detail/trace/index';
  10. export default function FocusArea({isVideoReplay}: {isVideoReplay?: boolean}) {
  11. const {getActiveTab} = useActiveReplayTab({isVideoReplay});
  12. switch (getActiveTab()) {
  13. case TabKey.A11Y:
  14. return <A11y />;
  15. case TabKey.NETWORK:
  16. return <NetworkList />;
  17. case TabKey.TRACE:
  18. return <Trace />;
  19. case TabKey.ERRORS:
  20. return <ErrorList />;
  21. case TabKey.MEMORY:
  22. return <MemoryPanel />;
  23. case TabKey.CONSOLE:
  24. return <Console />;
  25. case TabKey.TAGS:
  26. return <TagPanel />;
  27. case TabKey.BREADCRUMBS:
  28. default: {
  29. return <Breadcrumbs />;
  30. }
  31. }
  32. }