import { ChevronRightIcon, CircleCheckIcon, CircleIcon } from "lucide-react"; import { Link } from "react-router"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "src/components/ui/card"; import { useOnboardingData } from "src/hooks/useOnboardingData"; import { cn } from "src/lib/utils"; interface ChecklistItemProps { title: string; checked: boolean; description: string; to: string; disabled: boolean; index: number; } function OnboardingChecklist() { const { isLoading, checklistItems } = useOnboardingData(); if (isLoading || !checklistItems.find((x) => !x.checked)) { return null; } return ( Get started with your Alby Hub Follow these initial steps to set up and make the most of your Alby Hub. {checklistItems.map((item, index) => ( ))} ); } function ChecklistItem({ title, checked = false, description, to, disabled = false, index, }: ChecklistItemProps) { const content = (
{!checked && !disabled && (
)}
{checked ? ( ) : ( )}
{index + 1}. {title}
{!checked && (
{description}
)}
); return checked || disabled ? content : {content}; } export default OnboardingChecklist;