MCPcopy Create free account
hub / github.com/pollinations/pollinations / TutorialModal

Function TutorialModal

apps/chat/src/components/TutorialModal.jsx:474–522  ·  view source on GitHub ↗
({ isOpen, onClose })

Source from the content-addressed store, hash-verified

472};
473
474const TutorialModal = ({ isOpen, onClose }) => {
475 const {
476 currentStep,
477 currentStepData,
478 highlightRect,
479 tooltipPosition,
480 animationState,
481 isFirstStep,
482 isLastStep,
483 totalSteps,
484 isCentered,
485 handleNext,
486 handlePrev,
487 handleSkip,
488 handleDotClick,
489 } = useTutorial(isOpen, onClose);
490
491 if (!isOpen) return null;
492
493 if (!currentStepData) {
494 console.error("TutorialModal: No step data available");
495 return null;
496 }
497
498 return (
499 <div className="tutorial-modal-container" aria-hidden={!isOpen}>
500 <TutorialOverlay
501 highlightRect={highlightRect}
502 isTransitioning={animationState.isTransitioning}
503 />
504
505 <TutorialTooltip
506 step={currentStepData}
507 currentStep={currentStep}
508 totalSteps={totalSteps}
509 position={tooltipPosition}
510 animationState={animationState}
511 isFirstStep={isFirstStep}
512 isLastStep={isLastStep}
513 isCentered={isCentered}
514 onPrev={handlePrev}
515 onNext={handleNext}
516 onSkip={handleSkip}
517 onDotClick={handleDotClick}
518 onClose={onClose}
519 />
520 </div>
521 );
522};
523
524TutorialModal.propTypes = {
525 isOpen: PropTypes.bool.isRequired,

Callers

nothing calls this directly

Calls 2

useTutorialFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected