'use client'; import { useEffect, useState } from 'react'; import Link from 'next/link'; import { ArrowRight, Check, QrCode, Sparkles, X } from 'lucide-react'; import { Button } from '@/components/ui/Button'; import { Badge } from '@/components/ui/Badge'; import { Card, CardContent } from '@/components/ui/Card'; import { getChecklistItems, ONBOARDING_CHECKLIST_DISMISS_KEY, } from '@/lib/revops'; type OnboardingChecklistProps = { state: { signupSourceSelfReported?: string | null; primaryUseCase?: string | null; firstQrCreatedAt?: string | null; firstDynamicQrAt?: string | null; firstScanAt?: string | null; activationAt?: string | null; } | null; }; export function OnboardingChecklist({ state }: OnboardingChecklistProps) { const [dismissed, setDismissed] = useState(false); useEffect(() => { setDismissed(localStorage.getItem(ONBOARDING_CHECKLIST_DISMISS_KEY) === '1'); }, []); if (!state || state.firstScanAt || dismissed) { return null; } const items = getChecklistItems(state); const completed = items.filter((item) => item.done).length; const progress = Math.round((completed / items.length) * 100); return (
Activation path

Get to your first result faster

Finish the onboarding checklist to unlock a cleaner dashboard state and move from setup into real usage.

{completed}/{items.length} done
{items.map((item) => (
{item.done ? : }

{item.label}

{item.done ? 'Completed and saved in your setup state.' : 'Still pending. Finish this to move closer to activation.'}

))}
); }