renderPipelineView.tsx 545 B

123456789101112131415
  1. import ReactDOM from 'react-dom';
  2. import {ROOT_ELEMENT} from 'sentry/constants';
  3. import {PipelineInitialData} from 'sentry/types';
  4. import PipelineView from 'sentry/views/integrationPipeline/pipelineView';
  5. function render(pipelineName: string, props: PipelineInitialData['props']) {
  6. const rootEl = document.getElementById(ROOT_ELEMENT);
  7. ReactDOM.render(<PipelineView pipelineName={pipelineName} {...props} />, rootEl);
  8. }
  9. export function renderPipelineView() {
  10. const {name, props} = window.__pipelineInitialData;
  11. render(name, props);
  12. }