"use client"; import { Dialog, DialogContent, DialogTitle } from "./ui/dialog"; import { Button } from "./ui/button"; import { ArrowRightIcon } from "lucide-react"; import { useState, useEffect } from "react"; import ReactMarkdown from "react-markdown"; export function Onboarding() { const [step, setStep] = useState(0); const [isOpen, setIsOpen] = useState(false); useEffect(() => { const hasSeenOnboarding = localStorage.getItem("hasSeenOnboarding"); if (!hasSeenOnboarding) { setIsOpen(true); } }, []); const handleNext = () => { setStep(step + 1); }; const handleClose = () => { setIsOpen(false); localStorage.setItem("hasSeenOnboarding", "true"); }; const getStepTitle = () => { switch (step) { case 0: return "Welcome to OpenCut Beta! 🎉"; case 1: return "⚠️ This is a super early beta!"; case 2: return "🦋 Have fun testing!"; default: return "OpenCut Onboarding"; } }; const renderStepContent = () => { switch (step) { case 0: return (
{children}
, a: ({ href, children }) => ( {children} ), }} > {description}