Skip to content

Commit

Permalink
fim
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaisEFAG committed May 10, 2024
1 parent 7cf239f commit 71c2606
Showing 1 changed file with 52 additions and 10 deletions.
62 changes: 52 additions & 10 deletions src/Components/CardLocaisEdit/CardLocaisEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,38 +21,79 @@ const CardLocaisEdit = ({ local }) => {

return (
<form onSubmit={handleSubmit(handleEdit)}>
<div>
<label htmlFor="nome_local">Nome do local</label>
<input
{...register("nome_local", { required: true })}
defaultValue={local.nome_local}
/>
</div>
<div>

<label htmlFor="descricao_local">Descreva o local:</label>
<input
{...register("descricao_local", { required: true })}
defaultValue={local.descricao_local}
/>
/>
</div>
<div>

<label htmlFor="cep">Cep:</label>
<input
{...register("localizacao_cep", { required: true })}
defaultValue={local.localizacao_cep}
/>
/>
</div>
<div>

<label htmlFor="localizacao_endereco">Endereço:</label>
<input
{...register("localizacao_endereco", { required: true })}
defaultValue={local.localizacao_endereco}
/>
/>
</div>
<div>

<label htmlFor="localizacao_cidade">Cidade:</label>
<input
{...register("localizacao_cidade", { required: true })}
defaultValue={local.localizacao_cidade}
/>
/>
</div>
<div>

<label htmlFor="localizacao_estado">Estado:</label>
<input
{...register("localizacao_estado", { required: true })}
defaultValue={local.localizacao_estado}
/>
/>
</div>
<div>
<label htmlFor="coorMaps">Latitude</label>
<input
{...register("localizacao_coordenadas", { required: true })}
defaultValue={local.localizacao_coordenadas}
/>
{...register("localizacao_latitude", { required: true })}
defaultValue={local.localizacao_latitude}
/>

</div>
<div>

<label htmlFor="coorMaps">Longitude</label>
<input
{...register("localizacao_longitude", { required: true })}
defaultValue={local.localizacao_longitude}
/>
</div>
<div>

<label htmlFor="typeExport">Tipos de esporte</label>
<input
{...register("tipos_esportes", { required: true })}
defaultValue={local.tipos_esportes}
/>
/>
</div>
<div>


<button type="button" onClick={toggleDisable}>
{desabilitar ? "Editar" : "Cancelar"}
Expand All @@ -64,9 +105,10 @@ const CardLocaisEdit = ({ local }) => {
type="button"
onClick={() => removeLoc(local.id)}
disabled={desabilitar}
>
>
Excluir
</button>
</div>
</form>
);
};
Expand Down

0 comments on commit 71c2606

Please sign in to comment.