diff --git a/src/components/EditarModal.jsx b/src/components/EditarModal.jsx index f08c2bd..e25ae39 100644 --- a/src/components/EditarModal.jsx +++ b/src/components/EditarModal.jsx @@ -1,4 +1,8 @@ +import { useState } from "react"; export default function EditarModal({ tipo, coord, show, close, setCoords }) { + if (coord == null) return null; + const [hasY, setHasY] = useState(coord.y !== null); + const handleSubmit = (e) => { e.preventDefault(); @@ -50,6 +54,18 @@ export default function EditarModal({ tipo, coord, show, close, setCoords }) {