contextBlock.tsx 506 B

12345678910111213141516171819202122
  1. import ErrorBoundary from 'sentry/components/errorBoundary';
  2. import KeyValueList from 'sentry/components/events/interfaces/keyValueList';
  3. import {KeyValueListData} from 'sentry/types';
  4. type Props = {
  5. data: KeyValueListData;
  6. raw?: boolean;
  7. };
  8. const ContextBlock = ({data, raw = false}: Props) => {
  9. if (data.length === 0) {
  10. return null;
  11. }
  12. return (
  13. <ErrorBoundary mini>
  14. <KeyValueList data={data} raw={raw} isContextData />
  15. </ErrorBoundary>
  16. );
  17. };
  18. export default ContextBlock;