import { useState } from 'react'; interface AddRepoModalProps { isOpen: boolean; onClose: () => void; onSubmit: (namespace: string, repo: string) => void; } export function AddRepoModal({ isOpen, onClose, onSubmit }: AddRepoModalProps) { const [namespace, setNamespace] = useState(''); const [repo, setRepo] = useState(''); const [loading, setLoading] = useState(false); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); if (!namespace || !repo) return; setLoading(true); await onSubmit(namespace, repo); setLoading(false); setNamespace(''); setRepo(''); onClose(); }; if (!isOpen) return null; return (

Add Repository

setNamespace(e.target.value)} className="w-full bg-gray-700 text-white rounded-lg px-4 py-2 border border-gray-600 focus:border-blue-500 focus:outline-none" placeholder="e.g., smol-users" />
setRepo(e.target.value)} className="w-full bg-gray-700 text-white rounded-lg px-4 py-2 border border-gray-600 focus:border-blue-500 focus:outline-none" placeholder="e.g., whisper-small" />
); }