Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5428 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5428 Rev 5429
Línea 43... Línea 43...
43
  const fetchAuthLinks = async () => {
43
  const fetchAuthLinks = async () => {
44
    const response = await axios.get(`/company/view/${companyId}`)
44
    const response = await axios.get(`/company/view/${companyId}`)
45
    const { success, data } = response.data
45
    const { success, data } = response.data
Línea 46... Línea 46...
46
 
46
 
47
    if (success) {
47
    if (success) {
48
      const filterResponse = Object.entries(data).filter((key) => key[0].includes('link') && key[1])
48
      const filterResponse = Object.entries(data).filter((key) => key[0].includes('link') && key[1] && key[0] !== 'link_inmail')
Línea 49... Línea 49...
49
      const responseAuthLinks = Object.fromEntries(filterResponse)
49
      const responseAuthLinks = Object.fromEntries(filterResponse)
50
 
50
 
Línea 76... Línea 76...
76
  }
76
  }
Línea 77... Línea 77...
77
 
77
 
Línea 78... Línea 78...
78
  useEffect(() => fetchAuthLinks(), [])
78
  useEffect(() => fetchAuthLinks(), [])
79
 
79
 
80
  return (
-
 
81
        <div className="user_profile">
80
  return (
82
            <div className="user-pro-img">
81
        <div className="company-info">
83
                <img
82
            <img
84
                    src={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ''}`}
83
                src={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ''}`}
-
 
84
                alt="profile-image"
-
 
85
            />
-
 
86
            <h2>{companyName}</h2>
-
 
87
            <div className="row">
-
 
88
                {facebook && <FacebookIcon onClick={() => openRrss(facebook)} className="cursor-pointer" />}
85
                    alt="profile-image"
89
                {twitter && <TwitterIcon onClick={() => openRrss(twitter)} className="cursor-pointer" />}
86
                />
90
                {instagram && <InstagramIcon onClick={() => openRrss(instagram)} className="cursor-pointer" />}
87
            </div>
91
            </div>
88
            <div className="user_pro_status horizontal-list">
-
 
89
                <h1>{companyName}</h1>
-
 
90
                <div className="row px-5" style={{ marginTop: '10px' }}>
-
 
91
                    {facebook && <FacebookIcon onClick={() => openRrss(facebook)} className="cursor-pointer" />}
-
 
92
                    {twitter && <TwitterIcon onClick={() => openRrss(twitter)} className="cursor-pointer" />}
92
            <span>
93
                    {instagram && <InstagramIcon onClick={() => openRrss(instagram)} className="cursor-pointer" />}
-
 
94
                </div>
-
 
95
                <div className="members_count">
-
 
96
                    <b style={{ fontSize: '1rem' }} id="total-followers">{followers}</b>
93
                <b>{followers}</b>
97
                    <p style={{ fontSize: '1rem' }} className="ellipsis">Seguidores</p>
94
                Seguidores
98
                </div>
95
            </span>
99
                <div className="row ">
96
            <div className="row">
100
                    {Object.entries(authLinks).map(([key, value]) => (
97
                {Object.entries(authLinks).map(([key, value]) => (
101
                            <button
98
                    <button
102
                                key={key}
99
                        key={key}
103
                                className={`btn btn-${authClasses[key]}`}
100
                        className={`btn btn-${authClasses[key]}`}
104
                                onClick={() => handleButtonAction(value)}
101
                        onClick={() => handleButtonAction(value)}
105
                            >
102
                    >
106
                                {authLabels[key]}
103
                        {authLabels[key]}
107
                            </button>
-
 
108
                    ))}
104
                    </button>
109
                </div>
105
                ))}
110
            </div>
106
            </div>
111
        </div>
107
        </div>