Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5406 Rev 5411
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React, { useEffect, useRef } from 'react'
2
import React, { useEffect, useRef, useState } from 'react'
3
import { useState } from 'react'
-
 
4
import { connect } from 'react-redux'
3
import { connect } from 'react-redux'
5
import { axios } from '../../../utils'
4
import { axios } from '../../../utils'
6
import CompanyFollowersHelper from '../../../shared/helpers/company-followers-helper/CompanyFollowers'
5
import CompanyFollowersHelper from '../../../shared/helpers/company-followers-helper/CompanyFollowers'
7
import parse from 'html-react-parser'
6
import parse from 'html-react-parser'
8
import { addNotification } from '../../../redux/notification/notification.actions'
7
import { addNotification } from '../../../redux/notification/notification.actions'
9
import Spinner from '../../../shared/loading-spinner/Spinner'
8
import Spinner from '../../../shared/loading-spinner/Spinner'
10
import { setTimelineUrl } from '../../../redux/feed/feed.actions'
9
import { setTimelineUrl } from '../../../redux/feed/feed.actions'
11
import FeedSection from '../../../dashboard/components/feed-section/FeedSection'
10
import FeedSection from '../../../dashboard/components/feed-section/FeedSection'
-
 
11
import SuggestWidget from '../../../shared/helpers/my-groups-helper/SuggestWidget'
Línea 12... Línea 12...
12
 
12
 
13
const TABS = {
13
const TABS = {
14
  FEEDS: 'FEEDS',
14
  FEEDS: 'FEEDS',
15
  INFO: 'INFO'
15
  INFO: 'INFO'
Línea 32... Línea 32...
32
    companySize,
32
    companySize,
33
    foundationYear,
33
    foundationYear,
34
    website,
34
    website,
35
    timeline
35
    timeline
36
  } = props.backendVars
36
  } = props.backendVars
37
 
-
 
38
  // redux destructuring
37
  // redux destructuring
39
  const { addNotification, setTimelineUrl } = props
38
  const { addNotification, setTimelineUrl } = props
Línea 40... Línea -...
40
 
-
 
41
  // const [isFollower, setIsFollower] = useState(!!+follower);
39
 
42
  const [authorizedLinks, setAuthorizedLinks] = useState(null)
-
 
43
  const [loading, setLoading] = useState(false)
40
  const [authorizedLinks, setAuthorizedLinks] = useState(null)
44
  const [followers, setFollowers] = useState(totalFollowers)
41
  const [followers, setFollowers] = useState(totalFollowers)
45
  const [initialLoading, setInitialLoading] = useState(true)
42
  const [initialLoading, setInitialLoading] = useState(true)
46
  const [isFollower, setIsFollower] = useState(false)
43
  const [isFollower, setIsFollower] = useState(false)
47
  const [currentTab, setCurrentTab] = useState(TABS.INFO)
-
 
48
  const [suggestionCompanies, setSuggestionCompanies] = useState([])
-
 
49
  const [lookMore, setLookMore] = useState(false)
44
  const [currentTab, setCurrentTab] = useState(TABS.INFO)
Línea 50... Línea 45...
50
  const shouldSetInitialTab = useRef(true)
45
  const shouldSetInitialTab = useRef(true)
51
 
46
 
52
  useEffect(() => {
47
  useEffect(() => {
53
    setTimelineUrl(timeline)
48
    setTimelineUrl(timeline)
54
    fetchAuthorizedLinks()
49
    fetchAuthorizedLinks()
55
    shouldSetInitialTab.current = false
-
 
56
    setInitialLoading(false)
50
    shouldSetInitialTab.current = false
Línea 57... Línea -...
57
    getSuggestionCompanies()
-
 
58
  }, [])
-
 
59
 
-
 
60
  const getSuggestionCompanies = async () => {
-
 
61
    try {
-
 
62
      setLoading(true)
-
 
63
      const response = await axios.get(`/helpers/company-suggestion/${companyId}`)
-
 
64
      if (response.data.success) { setSuggestionCompanies(response.data.data) }
-
 
65
    } catch (error) {
-
 
66
      console.log('>>: error > ', error)
-
 
67
    } finally {
-
 
68
      setLoading(false)
-
 
69
    }
51
    setInitialLoading(false)
70
  }
52
  }, [])
71
 
53
 
72
  useEffect(() => {
54
  useEffect(() => {
73
    isFollower
55
    isFollower
Línea 92... Línea 74...
92
    }
74
    }
93
    return setLoading(false)
75
    return setLoading(false)
94
  }
76
  }
Línea 95... Línea 77...
95
 
77
 
96
  const handleButtonAction = async (link) => {
-
 
97
    setLoading(true)
78
  const handleButtonAction = async (link) => {
98
    const response = await axios.post(link)
79
    const response = await axios.post(link)
99
    const resData = response.data
80
    const resData = response.data
100
    if (resData.success) {
81
    if (resData.success) {
101
      addNotification({
82
      addNotification({
102
        style: 'success',
83
        style: 'success',
103
        msg: resData.data
84
        msg: resData.data
104
      })
85
      })
105
      fetchAuthorizedLinks()
86
      fetchAuthorizedLinks()
106
    } else {
-
 
107
      setLoading(false)
87
    } else {
108
      addNotification({
88
      addNotification({
109
        style: 'danger',
89
        style: 'danger',
110
        msg: 'ha ocurrido un error'
90
        msg: 'ha ocurrido un error'
111
      })
91
      })
112
    }
92
    }
113
  }
-
 
114
  const changeCurrentTab = (tab) => {
-
 
115
    setCurrentTab(tab)
-
 
Línea 116... Línea 93...
116
  }
93
  }
117
 
-
 
118
  const getData = () => {
-
 
119
    let infoFollows = [...suggestionCompanies]
-
 
120
    if (!lookMore) {
-
 
121
      infoFollows = infoFollows.slice(0, 3)
-
 
122
    }
94
 
123
    return infoFollows
95
  const changeCurrentTab = (tab) => setCurrentTab(tab)
124
  }
96
 
125
  return (
97
  return (
126
    <>
98
    <>
127
      <section className="cover-sec">
99
      <section className="cover-sec">
128
        <img
100
        <img
129
          id="user-cover-img"
101
          id="user-cover-img"
130
          src={`/storage/type/company-cover/code/${companyId}/${cover ? `filename/${cover}` : ''
102
          src={`/storage/type/company-cover/code/${companyId}/${cover ? `filename/${cover}` : ''
131
            }`}
103
            }`}
132
          alt="cover-image"
104
          alt="cover-image"
133
        />
-
 
134
      </section>
105
        />
135
      <main className="main-section">
106
      </section>
136
        <div className="main-section-data">
107
      <main className="main-section-data container px-0 mt-3">
137
          <div className="main-left-sidebar">
108
        <div className="main-left-sidebar">
138
            <div className="user_profile">
109
          <div className="user_profile">
139
              <div className="user-pro-img">
110
            <div className="user-pro-img">
140
                <img
111
              <img
-
 
112
                src={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ''}`}
-
 
113
                alt="profile-image"
-
 
114
              />
-
 
115
            </div>
-
 
116
            <div className="user_pro_status horizontal-list">
-
 
117
              <h1>{companyName}</h1>
-
 
118
              <div className="row px-5" style={{ marginTop: '10px' }}>
-
 
119
                {facebook &&
-
 
120
                  <i
-
 
121
                    onClick={() => window.location.href = facebook}
-
 
122
                    className="cursor-pointer fa fa-facebook"
-
 
123
                    style={{ fontSize: '1.4rem' }}
-
 
124
                  />
-
 
125
                }
-
 
126
                {twitter &&
-
 
127
                  <i
-
 
128
                    onClick={() => window.location.href = twitter}
-
 
129
                    className="cursor-pointer fa fa-twitter"
-
 
130
                    style={{ fontSize: '1.4rem' }}
-
 
131
                  />
-
 
132
                }
-
 
133
                {instagram &&
-
 
134
                  <i
-
 
135
                    onClick={() => window.location.href = instagram}
141
                  src={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ''}`}
136
                    className="fa fa-instagram cursor-pointer"
-
 
137
                    style={{ fontSize: '1.4rem' }}
142
                  alt="profile-image"
138
                  />
143
                />
139
                }
144
              </div>
140
              </div>
145
              <div className="user_pro_status horizontal-list">
141
              <div className="container horizontal-list">
-
 
142
                <div className="row ">
-
 
143
                  <div className="members_count">
146
                <h1>{companyName}</h1>
144
                    <b style={{ fontSize: '1rem' }} id="total-followers">{followers}</b>
-
 
145
                    <p style={{ fontSize: '1rem' }} className="ellipsis">Seguidores</p>
147
                <div className="row px-5" style={{ marginTop: '10px' }}>
146
                  </div>
148
                  {facebook &&
147
                  {authorizedLinks?.link_unfollow &&
149
                    <i
148
                    <button
-
 
149
                      className="btn btn-secondary"
150
                      onClick={() => window.location.href = facebook}
150
                      onClick={() => handleButtonAction(authorizedLinks?.link_unfollow)}
151
                      className="cursor-pointer fa fa-facebook"
151
                    >
152
                      style={{ fontSize: '1.4rem' }}
152
                      Dejar de seguir
153
                    />
153
                    </button>
154
                  }
154
                  }
155
                  {twitter &&
155
                  {authorizedLinks?.link_follow &&
156
                    <i
156
                    <button
-
 
157
                      className="btn btn-secondary"
157
                      onClick={() => window.location.href = twitter}
158
                      onClick={() => handleButtonAction(authorizedLinks?.link_follow)}
158
                      className="cursor-pointer fa fa-twitter"
159
                    >
159
                      style={{ fontSize: '1.4rem' }}
160
                      Seguir
-
 
161
                    </button>
-
 
162
                  }
-
 
163
                  {
-
 
164
                    (authorizedLinks?.link_request && authorizedLinks?.link_unfollow) &&
-
 
165
                    <button
-
 
166
                      className="btn btn-tertiary"
-
 
167
                      onClick={() => handleButtonAction(authorizedLinks?.link_request)}
-
 
168
                    >
-
 
169
                      ¿Trabaja en esta empresa?
-
 
170
                    </button>
-
 
171
                  }
-
 
172
                  {authorizedLinks?.link_accept &&
-
 
173
                    <button
-
 
174
                      className="btn btn-tertiary"
-
 
175
                      onClick={() => handleButtonAction(authorizedLinks?.link_accept)}
-
 
176
                    >
-
 
177
                      Aceptar
-
 
178
                    </button>
-
 
179
                  }
160
                    />
180
                  {authorizedLinks?.link_cancel &&
-
 
181
                    <button
-
 
182
                      title=""
161
                  }
183
                      className="btn btn-tertiary"
-
 
184
                      onClick={() => handleButtonAction(authorizedLinks?.link_cancel)}
-
 
185
                    >
-
 
186
                      Cancelar
-
 
187
                    </button>
-
 
188
                  }
-
 
189
                  {authorizedLinks?.link_reject &&
-
 
190
                    <button
162
                  {instagram &&
191
                      title=""
-
 
192
                      className="btn btn-tertiary"
-
 
193
                      onClick={() => handleButtonAction(authorizedLinks?.link_reject)}
-
 
194
                    >
-
 
195
                      Rechazar
-
 
196
                    </button>
-
 
197
                  }
-
 
198
                  {authorizedLinks?.link_leave &&
-
 
199
                    <button
163
                    <i
200
                      data-link="{{>link_leave}}"
-
 
201
                      title=""
-
 
202
                      className="btn btn-tertiary"
-
 
203
                      onClick={() => handleButtonAction(authorizedLinks?.link_leave)}
-
 
204
                    >
-
 
205
                      Abandonar esta empresa
-
 
206
                    </button>
-
 
207
                  }
-
 
208
                  {authorizedLinks?.link_contact &&
164
                      onClick={() => window.location.href = instagram}
209
                    <a
165
                      className="fa fa-instagram cursor-pointer"
210
                      href={authorizedLinks?.link_contact}
-
 
211
                      className="btn btn-primary"
-
 
212
                    >
166
                      style={{ fontSize: '1.4rem' }}
213
                      Mensaje
167
                    />
-
 
168
                  }
-
 
169
                </div>
-
 
170
                <div className="container horizontal-list">
-
 
171
                  <div className="row ">
-
 
172
                    <div className="members_count">
-
 
173
                      <b style={{ fontSize: '1rem' }} id="total-followers">{followers}</b>
-
 
174
                      <p style={{ fontSize: '1rem' }} className="ellipsis">Seguidores</p>
-
 
175
                    </div>
-
 
176
                    {authorizedLinks?.link_unfollow &&
-
 
177
                      <button
-
 
178
                        className="btn btn-secondary"
-
 
179
                        onClick={() => handleButtonAction(authorizedLinks?.link_unfollow)}
-
 
180
                      >
-
 
181
                        Dejar de seguir
-
 
182
                      </button>
-
 
183
                    }
-
 
184
                    {authorizedLinks?.link_follow &&
-
 
185
                      <button
-
 
186
                        className="btn btn-secondary"
-
 
187
                        onClick={() => handleButtonAction(authorizedLinks?.link_follow)}
-
 
188
                      >
-
 
189
                        Seguir
-
 
190
                      </button>
-
 
191
                    }
-
 
192
                    {
-
 
193
                      (authorizedLinks?.link_request && authorizedLinks?.link_unfollow) &&
-
 
194
                      <button
-
 
195
                        className="btn btn-tertiary"
-
 
196
                        onClick={() => handleButtonAction(authorizedLinks?.link_request)}
-
 
197
                      >
-
 
198
                        ¿Trabaja en esta empresa?
-
 
199
                      </button>
-
 
200
                    }
-
 
201
                    {authorizedLinks?.link_accept &&
-
 
202
                      <button
-
 
203
                        className="btn btn-tertiary"
-
 
204
                        onClick={() => handleButtonAction(authorizedLinks?.link_accept)}
-
 
205
                      >
-
 
206
                        Aceptar
-
 
207
                      </button>
-
 
208
                    }
-
 
209
                    {authorizedLinks?.link_cancel &&
-
 
210
                      <button
-
 
211
                        title=""
-
 
212
                        className="btn btn-tertiary"
-
 
213
                        onClick={() => handleButtonAction(authorizedLinks?.link_cancel)}
-
 
214
                      >
-
 
215
                        Cancelar
-
 
216
                      </button>
-
 
217
                    }
-
 
218
                    {authorizedLinks?.link_reject &&
-
 
219
                      <button
-
 
220
                        title=""
-
 
221
                        className="btn btn-tertiary"
-
 
222
                        onClick={() => handleButtonAction(authorizedLinks?.link_reject)}
-
 
223
                      >
-
 
224
                        Rechazar
-
 
225
                      </button>
-
 
226
                    }
-
 
227
                    {authorizedLinks?.link_leave &&
-
 
228
                      <button
-
 
229
                        data-link="{{>link_leave}}"
-
 
230
                        title=""
-
 
231
                        className="btn btn-tertiary"
-
 
232
                        onClick={() => handleButtonAction(authorizedLinks?.link_leave)}
-
 
233
                      >
-
 
234
                        Abandonar esta empresa
-
 
235
                      </button>
-
 
236
                    }
-
 
237
                    {authorizedLinks?.link_contact &&
-
 
238
                      <a
-
 
239
                        href={authorizedLinks?.link_contact}
-
 
240
                        className="btn btn-primary"
-
 
241
                      >
-
 
242
                        Mensaje
-
 
243
                      </a>
-
 
244
                    }
214
                    </a>
245
                  </div>
215
                  }
246
                </div>
216
                </div>
247
              </div>
-
 
248
            </div>
-
 
249
            <div className="d-none d-md-block">
-
 
250
              <CompanyFollowersHelper companyId={companyId} />
217
              </div>
251
            </div>
218
            </div>
252
          </div>
219
          </div>
253
          <div className="main-ws-sec">
220
          <div className="d-none d-md-block">
254
            <div className="user-tab-sec rewivew">
221
            <CompanyFollowersHelper companyId={companyId} />
255
              {!initialLoading &&
222
          </div>
256
                <div className="row">
223
        </div>
257
                  {isFollower &&
224
        <div className="main-ws-sec">
258
                    <div className="col text-left pl-0">
-
 
259
                      <button
-
 
260
                        className="btn btn-link p-0 text-decoration-none"
-
 
261
                        onClick={() => changeCurrentTab(TABS.FEEDS)}
-
 
262
                        style={{ padding: '0 !important' }}
-
 
263
                      >
225
          <div className="user-tab-sec rewivew">
264
                        <span className="p-0 default-link font-weight-bold text-dark">Ver Publicaciones</span>
226
            {!initialLoading &&
265
                      </button>
-
 
266
                    </div>
227
              <div className="row">
267
                  }
228
                {isFollower &&
268
                  <div className="col text-right pr-0">
229
                  <div className="col text-left pl-0">
269
                    <button
230
                    <button
270
                      className="btn btn-link p-0 text-decoration-none"
231
                      className="btn btn-link p-0 text-decoration-none"
271
                      onClick={() => changeCurrentTab(TABS.INFO)}
232
                      onClick={() => changeCurrentTab(TABS.FEEDS)}
272
                      style={{ padding: '0 !important' }}
233
                      style={{ padding: '0 !important' }}
273
                    >
234
                    >
274
                      <span className="p-0 default-link font-weight-bold text-dark">Ver Información</span>
235
                      <span className="p-0 default-link font-weight-bold text-dark">Ver Publicaciones</span>
275
                    </button>
-
 
276
                  </div>
-
 
277
                </div>
-
 
278
              }
-
 
279
            </div>
-
 
280
            {
-
 
281
              currentTab === TABS.FEEDS &&
-
 
282
              <div
-
 
283
                className="product-feed-tab animated fadeIn"
-
 
284
                id="feed-dd feed"
-
 
285
                style={{ display: 'block' }}
-
 
286
              >
-
 
287
                <div className="posts-section">
-
 
288
                  <FeedSection
-
 
289
                    routeTimeline={timeline}
-
 
290
                    image={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ''}`}
-
 
291
                  />
-
 
292
                </div>
-
 
293
              </div>
-
 
294
            }
-
 
295
            {
-
 
296
              currentTab === TABS.INFO &&
-
 
297
              < div
-
 
298
                className="product-feed-tab animated fadeIn"
-
 
299
                id="feed-dd info"
-
 
300
                style={{ display: 'block' }}
-
 
301
              >
-
 
302
                {
-
 
303
                  overview &&
-
 
304
                  <div className="user-profile-extended-ov">
-
 
305
                    <h3>Visión general</h3>
-
 
306
                    <span>{parse(overview)}</span>
236
                    </button>
307
                  </div>
-
 
308
                }
-
 
309
                {
-
 
310
                  locations &&
-
 
311
                  <div className="user-profile-extended-ov st2">
-
 
312
                    <h3>Ubicación</h3>
-
 
313
                    <span>
-
 
314
                      {locations.map(
-
 
315
                        ({ formatted_address, is_main }, index) => (
-
 
316
                          <React.Fragment key={index}>
-
 
317
                            {index >= 0 ? <hr /> : ''}
-
 
318
                            <p>
-
 
319
                              {`${formatted_address} ${is_main === 'y' ? '(Principal)' : ''
-
 
320
                                }`}
-
 
321
                            </p>
-
 
322
                          </React.Fragment>
-
 
323
                        )
-
 
324
                      )}
-
 
325
                    </span>
-
 
326
                  </div>
-
 
327
                }
-
 
328
                {
237
                  </div>
329
                  industry &&
-
 
330
                  <div className="user-profile-ov">
-
 
331
                    <h3>Industria</h3>
238
                }
332
                    <span>{industry}</span>
-
 
333
                  </div>
-
 
334
                }
-
 
335
                {
239
                <div className="col text-right pr-0">
336
                  companySize &&
240
                  <button
337
                  <div className="user-profile-ov">
241
                    className="btn btn-link p-0 text-decoration-none"
338
                    <h3>Tamaño de la empresa</h3>
-
 
339
                    <span>{companySize}</span>
-
 
340
                  </div>
242
                    onClick={() => changeCurrentTab(TABS.INFO)}
341
                }
-
 
342
                {
-
 
343
                  foundationYear &&
-
 
344
                  <div className="user-profile-ov">
243
                    style={{ padding: '0 !important' }}
345
                    <h3>Año de fundación</h3>
244
                  >
346
                    <span>{foundationYear}</span>
-
 
347
                  </div>
-
 
348
                }
-
 
349
                {
-
 
350
                  website &&
-
 
351
                  <div className="user-profile-ov">
-
 
352
                    <h3>Página web</h3>
245
                    <span className="p-0 default-link font-weight-bold text-dark">Ver Información</span>
353
                    <span>{website}</span>
-
 
354
                  </div>
-
 
355
                }
-
 
356
              </div>
-
 
357
            }
-
 
358
            {
-
 
359
              initialLoading &&
-
 
360
              <div
-
 
361
                style={{
-
 
362
                  display: 'flex',
-
 
363
                  justifyContent: 'center',
-
 
364
                  alignItems: 'center'
-
 
365
                }}
-
 
366
              >
246
                  </button>
367
                <Spinner />
247
                </div>
368
              </div>
248
              </div>
369
            }
-
 
370
          </div>
249
            }
371
          <div className="right-sidebar">
-
 
372
            {loading &&
250
          </div>
373
              <div className="spinner-container">
251
          {
374
                <Spinner />
-
 
375
              </div>
252
            currentTab === TABS.FEEDS &&
376
            }
-
 
377
            <div className="peopleYouMayKnow">
-
 
378
              <div className="sd-title d-flex align-items-center justify-content-between">
-
 
379
                <h3>Empresas similares:</h3>
-
 
380
                {suggestionCompanies.length >= 5 &&
253
            <div
381
                  <a href="#" onClick={(e) => {
254
              className="product-feed-tab animated fadeIn"
382
                    e.preventDefault()
-
 
383
                    setLookMore(!lookMore)
-
 
384
                  }}>
-
 
385
                    {lookMore ? 'Ver menos' : 'Ver mas'}
255
              id="feed-dd feed"
386
                  </a>
-
 
387
                }
256
              style={{ display: 'block' }}
388
              </div>
-
 
389
              <div className="suggest-list">
-
 
390
                {suggestionCompanies.length
257
            >
391
                  ? getData().map(element => {
-
 
392
                    return (
-
 
393
                      <div className='user' key={element.id}>
-
 
394
                        <div className="w-100 d-flex align-items-center" style={{ gap: '.5rem' }}>
-
 
395
                          <a href={element.profile} target="_blank" rel="noreferrer">
-
 
396
                            <img src={element.image} alt={`${element.name} profile image`} />
-
 
397
                          </a>
-
 
398
                          <h4>{element.name}</h4>
-
 
399
                        </div>
-
 
400
                        <a
-
 
401
                          className="btn btn-primary"
258
              <div className="posts-section">
402
                          href={element.profile}
-
 
403
                          target='_blank'
-
 
404
                          rel="noreferrer"
-
 
405
                          style={{ fontSize: '.9rem', borderRadius: '4px' }}
-
 
406
                        >
-
 
407
                          MÁS INF
-
 
408
                        </a>
-
 
409
                      </div>
-
 
410
                    )
259
                <FeedSection
411
                  })
260
                  routeTimeline={timeline}
412
                  : <div className="view-more">Sin empresas similares</div>
261
                  image={`/storage/type/company/code/${companyId}/${image ? `filename/${image}` : ''}`}
413
                }
262
                />
-
 
263
              </div>
-
 
264
            </div>
-
 
265
          }
-
 
266
          {
-
 
267
            currentTab === TABS.INFO &&
-
 
268
            < div
-
 
269
              className="product-feed-tab animated fadeIn"
-
 
270
              id="feed-dd info"
-
 
271
              style={{ display: 'block' }}
-
 
272
            >
-
 
273
              {
-
 
274
                overview &&
-
 
275
                <div className="user-profile-extended-ov">
-
 
276
                  <h3>Visión general</h3>
-
 
277
                  <span>{parse(overview)}</span>
-
 
278
                </div>
-
 
279
              }
-
 
280
              {
-
 
281
                locations &&
-
 
282
                <div className="user-profile-extended-ov st2">
-
 
283
                  <h3>Ubicación</h3>
-
 
284
                  <span>
-
 
285
                    {locations.map(
-
 
286
                      ({ formatted_address, is_main }, index) => (
-
 
287
                        <React.Fragment key={index}>
-
 
288
                          {index >= 0 ? <hr /> : ''}
-
 
289
                          <p>
-
 
290
                            {`${formatted_address} ${is_main === 'y' ? '(Principal)' : ''
-
 
291
                              }`}
-
 
292
                          </p>
-
 
293
                        </React.Fragment>
-
 
294
                      )
-
 
295
                    )}
-
 
296
                  </span>
-
 
297
                </div>
-
 
298
              }
-
 
299
              {
-
 
300
                industry &&
-
 
301
                <div className="user-profile-ov">
-
 
302
                  <h3>Industria</h3>
-
 
303
                  <span>{industry}</span>
-
 
304
                </div>
-
 
305
              }
-
 
306
              {
-
 
307
                companySize &&
-
 
308
                <div className="user-profile-ov">
-
 
309
                  <h3>Tamaño de la empresa</h3>
-
 
310
                  <span>{companySize}</span>
-
 
311
                </div>
-
 
312
              }
-
 
313
              {
-
 
314
                foundationYear &&
-
 
315
                <div className="user-profile-ov">
-
 
316
                  <h3>Año de fundación</h3>
-
 
317
                  <span>{foundationYear}</span>
-
 
318
                </div>
-
 
319
              }
-
 
320
              {
-
 
321
                website &&
-
 
322
                <div className="user-profile-ov">
-
 
323
                  <h3>Página web</h3>
-
 
324
                  <span>{website}</span>
-
 
325
                </div>
-
 
326
              }
-
 
327
            </div>
-
 
328
          }
-
 
329
          {
-
 
330
            initialLoading &&
-
 
331
            <div
-
 
332
              style={{
-
 
333
                display: 'flex',
-
 
334
                justifyContent: 'center',
-
 
335
                alignItems: 'center'
-
 
336
              }}
414
              </div>
337
            >
-
 
338
              <Spinner />
-
 
339
            </div>
-
 
340
          }
-
 
341
        </div>
415
            </div>
342
        <div className="right-sidebar">
416
          </div>
343
          <SuggestWidget title='Empresas similares:' url={`/helpers/company-suggestion/${companyId}`} />
417
        </div>
344
        </div>
418
      </main >
345
      </main>
419
    </>
346
    </>
Línea 420... Línea 347...
420
  )
347
  )