Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev Autor Línea Nro. Línea
3878 stevensc 1
/* eslint-disable react/prop-types */
2
import React from 'react'
3
 
4
const MemberTemplate = ({
5
    member = {},
6
    handleAction = function () { }
7
}) => {
8
 
9
    const { name = '', image = '', profile = '', actions = {} } = member
10
 
11
    return (
12
        <div className='user'>
13
            <div className="w-100 d-flex align-items-center justify-content-start" style={{ gap: '1rem' }}>
14
                <a href={profile} target="_blank" rel="noreferrer">
15
                    <img src={image} alt={`${name} profile image`} />
16
                </a>
17
                <h4>{name}</h4>
18
                {actions?.link_approve &&
19
                    <i
20
                        onClick={() => handleAction(actions.link_approve)}
21
                        className="fa fa-check icon-button btn btn-primary"
22
                        title="Aprobar"
23
                    />
24
                }
25
                {actions?.link_reject &&
26
                    <i
27
                        onClick={() => handleAction(actions.link_reject)}
28
                        className="fa fa-close icon-button btn btn-secondary"
29
                        title="Rechazar" />
30
                }
31
                {actions?.link_cancel &&
32
                    <i
33
                        onClick={() => handleAction(actions.link_cancel)}
34
                        className="fa fa-trash icon-button btn btn-secondary"
35
                        title="Cancelar"
36
                    />
37
                }
38
            </div>
39
        </div>
40
    )
41
}
42
 
43
export default MemberTemplate