Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5413 Rev 5414
Línea 1... Línea 1...
1
/* eslint-disable camelcase */
1
/* eslint-disable camelcase */
2
/* eslint-disable react/prop-types */
2
/* eslint-disable react/prop-types */
3
import React, { useEffect, useRef, useState } from 'react'
3
import React, { useEffect, useRef, useState } from 'react'
4
import { connect } from 'react-redux'
-
 
5
import { axios } from '../../../utils'
-
 
6
import CompanyFollowersHelper from '../../../shared/helpers/company-followers-helper/CompanyFollowers'
-
 
7
import parse from 'html-react-parser'
4
import parse from 'html-react-parser'
-
 
5
import { axios } from '../../../utils'
-
 
6
import { connect } from 'react-redux'
-
 
7
import { setIntlLabels } from '../../../redux/intl/intl.action'
-
 
8
import { setTimelineUrl } from '../../../redux/feed/feed.actions'
8
import { addNotification } from '../../../redux/notification/notification.actions'
9
import { addNotification } from '../../../redux/notification/notification.actions'
9
import Spinner from '../../../shared/loading-spinner/Spinner'
10
import Spinner from '../../../shared/loading-spinner/Spinner'
10
import { setTimelineUrl } from '../../../redux/feed/feed.actions'
-
 
11
import FeedSection from '../../../dashboard/components/feed-section/FeedSection'
11
import FeedSection from '../../../dashboard/components/feed-section/FeedSection'
12
import SuggestWidget from '../../../shared/helpers/my-groups-helper/SuggestWidget'
12
import SuggestWidget from '../../../shared/helpers/my-groups-helper/SuggestWidget'
-
 
13
import CompanyFollowersHelper from '../../../shared/helpers/company-followers-helper/CompanyFollowers'
Línea 13... Línea 14...
13
 
14
 
14
const TABS = {
15
const TABS = {
15
  FEEDS: 'FEEDS',
16
  FEEDS: 'FEEDS',
16
  INFO: 'INFO'
17
  INFO: 'INFO'
Línea 17... Línea 18...
17
}
18
}
18
 
19
 
-
 
20
const View = ({
-
 
21
  backendVars,
-
 
22
  addNotification,
-
 
23
  setTimelineUrl,
-
 
24
  setIntlLabels,
19
const View = (props) => {
25
  labels
20
  // backendVars destructuring
26
}) => {
21
  const {
27
  const {
22
    companyId,
28
    companyId,
23
    cover,
29
    cover,
Línea 32... Línea 38...
32
    industry,
38
    industry,
33
    companySize,
39
    companySize,
34
    foundationYear,
40
    foundationYear,
35
    website,
41
    website,
36
    timeline
42
    timeline
37
  } = props.backendVars
43
  } = backendVars
38
  // redux destructuring
-
 
39
  const { addNotification, setTimelineUrl } = props
-
 
Línea 40... Línea 44...
40
 
44
 
41
  const [authorizedLinks, setAuthorizedLinks] = useState(null)
45
  const [authorizedLinks, setAuthorizedLinks] = useState(null)
42
  const [followers, setFollowers] = useState(totalFollowers)
46
  const [followers, setFollowers] = useState(totalFollowers)
43
  const [initialLoading, setInitialLoading] = useState(true)
47
  const [initialLoading, setInitialLoading] = useState(true)
Línea 48... Línea 52...
48
  useEffect(() => {
52
  useEffect(() => {
49
    setTimelineUrl(timeline)
53
    setTimelineUrl(timeline)
50
    fetchAuthorizedLinks()
54
    fetchAuthorizedLinks()
51
    shouldSetInitialTab.current = false
55
    shouldSetInitialTab.current = false
52
    setInitialLoading(false)
56
    setInitialLoading(false)
-
 
57
    setIntlLabels(labels)
53
  }, [])
58
  }, [])
Línea 54... Línea 59...
54
 
59
 
55
  useEffect(() => {
60
  useEffect(() => {
56
    isFollower
61
    isFollower
Línea 345... Línea 350...
345
  )
350
  )
346
}
351
}
Línea 347... Línea 352...
347
 
352
 
348
const mapDispatchToProps = {
353
const mapDispatchToProps = {
349
  addNotification: (notification) => addNotification(notification),
354
  addNotification: (notification) => addNotification(notification),
-
 
355
  setTimelineUrl: (url) => setTimelineUrl(url),
350
  setTimelineUrl: (url) => setTimelineUrl(url)
356
  setIntlLabels: (labels) => setIntlLabels(labels)
Línea 351... Línea 357...
351
}
357
}