diff --git a/components/FeedbackForm.tsx b/components/FeedbackForm.tsx index 07b4e14..7fe9ef1 100644 --- a/components/FeedbackForm.tsx +++ b/components/FeedbackForm.tsx @@ -10,7 +10,7 @@ const CATEGORIES = [ { value: 'GENERAL', label: 'General feedback' }, ] -export function FeedbackForm({ onSuccess }: { onSuccess?: () => void }) { +export function FeedbackForm({ onSuccess, autoFocus = false }: { onSuccess?: () => void; autoFocus?: boolean }) { const [category, setCategory] = useState('BUG') const [message, setMessage] = useState('') const [email, setEmail] = useState('') @@ -64,7 +64,7 @@ export function FeedbackForm({ onSuccess }: { onSuccess?: () => void }) { value={category} onChange={(e) => setCategory(e.target.value)} disabled={status === 'loading'} - autoFocus + autoFocus={autoFocus} className="w-full appearance-none rounded-lg border border-zinc-800 bg-zinc-950 px-3 py-2.5 text-sm text-zinc-200 focus:border-amber-500/40 focus:outline-none disabled:opacity-50" > {CATEGORIES.map((c) => ( diff --git a/components/FeedbackModal.tsx b/components/FeedbackModal.tsx index ac0daaf..eb6b70b 100644 --- a/components/FeedbackModal.tsx +++ b/components/FeedbackModal.tsx @@ -45,7 +45,7 @@ export function FeedbackModal({ - + )