"use client"; import { ArrowRightIcon } from "lucide-react"; import { useState } from "react"; import ReactMarkdown from "react-markdown"; import { SOCIAL_LINKS } from "@/lib/site/social"; import { useLocalStorage } from "@/hooks/storage/use-local-storage"; import { Button } from "../ui/button"; import { Dialog, DialogBody, DialogContent, DialogTitle } from "../ui/dialog"; export function Onboarding() { const [step, setStep] = useState(0); const [hasSeenOnboarding, setHasSeenOnboarding] = useLocalStorage({ key: "hasSeenOnboarding", defaultValue: false, }); const isOpen = !hasSeenOnboarding; const handleNext = () => { setStep(step + 1); }; const handleClose = () => { setHasSeenOnboarding({ value: 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}