diff --git a/src/components/pet/PetForm.tsx b/src/components/pet/PetForm.tsx index 6b586e6..284f6c1 100644 --- a/src/components/pet/PetForm.tsx +++ b/src/components/pet/PetForm.tsx @@ -225,7 +225,9 @@ export function PetForm({ className="w-full" aria-invalid={!!errors.speciesId} > - + + {speciesList.find((s) => s.id === field.value)?.name ?? "Select species"} + {speciesList.map((species) => ( @@ -265,13 +267,13 @@ export function PetForm({ className="w-full" disabled={!selectedSpeciesId} > - + {field.value + ? (breedList.find((b) => b.id === field.value)?.name ?? "Select breed (optional)") + : selectedSpeciesId ? "Select breed (optional)" - : "Select a species first" - } - /> + : "Select a species first"} + {breedList.length === 0 ? (