renderPipelineView.tsx 547 B

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