import AddEntryForm from '@/components/Transactions/AddEntryForm'; import AddMilestoneForm from '@/components/Milestones/AddMilestoneForm'; import { cn } from '@/lib/utils'; type FormType = 'purchase' | 'milestone'; interface InlineFormProps { type: FormType | null; unit?: string; onClose: () => void; onSuccess?: (type: FormType) => void; className?: string; } export default function InlineForm({ type, unit = 'units', onClose, onSuccess, className, }: InlineFormProps) { if (!type) return null; const handleSuccess = () => { if (onSuccess) onSuccess(type); onClose(); }; return (
{type === 'purchase' ? ( ) : ( )}
); }