handleGuideUpdate.tsx 406 B

12345678910111213141516
  1. import type {Guide} from 'sentry/components/assistant/types';
  2. export default function handleGuideUpdate(
  3. nextGuide: Guide | null,
  4. {dismissed}: {dismissed?: boolean}
  5. ) {
  6. // if not ready, ignore
  7. if (!window.pendo?.isReady?.()) {
  8. return;
  9. }
  10. // only start Pendo if there is no next guide
  11. // and the user did not dismiss
  12. if (!nextGuide && !dismissed) {
  13. window.pendo.startGuides();
  14. }
  15. }