import {Component} from 'react'; import ClippedBox from 'sentry/components/clippedBox'; import ErrorBoundary from 'sentry/components/errorBoundary'; import EventDataSection from 'sentry/components/events/eventDataSection'; import KeyValueList from 'sentry/components/events/interfaces/keyValueList'; import {getMeta} from 'sentry/components/events/meta/metaProxy'; import {t} from 'sentry/locale'; import {Event} from 'sentry/types/event'; type Props = { event: Event; }; class EventPackageData extends Component { shouldComponentUpdate(nextProps: Props) { return this.props.event.id !== nextProps.event.id; } render() { const {event} = this.props; let longKeys: boolean, title: string; const packages = Object.entries(event.packages || {}).map(([key, value]) => ({ key, value, subject: key, meta: getMeta(event.packages, key), })); switch (event.platform) { case 'csharp': longKeys = true; title = t('Assemblies'); break; default: longKeys = false; title = t('Packages'); } return ( ); } } export default EventPackageData;