redux.tsx 740 B

1234567891011121314151617181920212223242526272829303132333435
  1. import {Component} from 'react';
  2. import ClippedBox from 'sentry/components/clippedBox';
  3. import ContextBlock from 'sentry/components/events/contexts/contextBlock';
  4. type KeyValueListData = React.ComponentProps<typeof ContextBlock>['data'];
  5. import {t} from 'sentry/locale';
  6. type Props = {
  7. alias: string;
  8. data: Record<string, any>;
  9. };
  10. class ReduxContextType extends Component<Props> {
  11. getKnownData(): KeyValueListData {
  12. return [
  13. {
  14. key: 'value',
  15. subject: t('Latest State'),
  16. value: this.props.data,
  17. },
  18. ];
  19. }
  20. render() {
  21. return (
  22. <ClippedBox clipHeight={250}>
  23. <ContextBlock data={this.getKnownData()} />
  24. </ClippedBox>
  25. );
  26. }
  27. }
  28. export default ReduxContextType;