Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 6019 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
6002 stevensc 1
import React from 'react'
2
 
3
const Location = ({ locations }) => {
4
 
5
    const editLocation = (url) => { }
6
 
7
    const deleteLocation = (url) => { }
8
 
9
    return (
10
        <div class="user-profile-extended-ov st2">
11
            <h3>
12
                Ubicaciones
13
                <button class="btn-location-add">
14
                    <i class="fa fa-plus-square" />
15
                </button>
16
            </h3>
17
            <span id="locations-records">
18
                {
19
                    locations
20
                        ?
21
                        locations.map((location) => (
22
                            <p>
23
                                {location.formatted_address}
24
                                {location.is_main === 'y' ? ("Principal") : ""}
25
                                <button
26
                                    onClick={() => editLocation(location.link_edit)}
27
                                    class="btn-location-edit"
28
                                >
29
                                    <i class="fa fa-pencil" />
30
                                </button>
31
                                <button
32
                                    onClick={() => deleteLocation(location.link_delete)}
33
                                    class="btn-location-delete"
34
                                >
35
                                    <i class="fa fa-trash" />
36
                                </button>
37
                            </p>
38
                        ))
39
                        :
40
                        <hr />
41
                }
42
            </span>
43
        </div >
44
    )
45
}
46
 
47
export default Location