Rev 6019 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'
const Location = ({ locations }) => {
const editLocation = (url) => { }
const deleteLocation = (url) => { }
return (
<div class="user-profile-extended-ov st2">
<h3>
Ubicaciones
<button class="btn-location-add">
<i class="fa fa-plus-square" />
</button>
</h3>
<span id="locations-records">
{
locations
?
locations.map((location) => (
<p>
{location.formatted_address}
{location.is_main === 'y' ? ("Principal") : ""}
<button
onClick={() => editLocation(location.link_edit)}
class="btn-location-edit"
>
<i class="fa fa-pencil" />
</button>
<button
onClick={() => deleteLocation(location.link_delete)}
class="btn-location-delete"
>
<i class="fa fa-trash" />
</button>
</p>
))
:
<hr />
}
</span>
</div >
)
}
export default Location