Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6515 Rev 6548
Línea 2... Línea 2...
2
import { axios } from '../../../utils'
2
import { axios } from '../../../utils'
3
import { useDispatch } from 'react-redux'
3
import { useDispatch } from 'react-redux'
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea 5...
5
import { addNotification } from '../../../redux/notification/notification.actions'
5
import { addNotification } from '../../../redux/notification/notification.actions'
6
 
6
 
7
const DailyPulse = ({ routeDailyPulse }) => {
7
const DailyPulse = ({ dailyPulseUrl }) => {
8
  const [emojisHowAreYouFeel, setEmojisHowAreYouFeel] = useState([])
8
  const [emojisHowAreYouFeel, setEmojisHowAreYouFeel] = useState([])
Línea 9... Línea 9...
9
  const [emojisClimateOnYourOrganization, setEmojisClimateOnYourOrganization] =
9
  const [emojisClimateOnYourOrganization, setEmojisClimateOnYourOrganization] =
10
    useState([])
10
    useState([])
11
 
11
 
12
  const getData = async (url = routeDailyPulse) => {
12
  const getData = async (url) => {
13
    try {
13
    try {
14
      const { data: response } = await axios.get(url)
14
      const { data: response } = await axios.get(url)
Línea 22... Línea 22...
22
      console.log(error)
22
      console.log(error)
23
    }
23
    }
24
  }
24
  }
Línea 25... Línea 25...
25
 
25
 
26
  useEffect(() => {
26
  useEffect(() => {
27
    getData()
27
    getData(dailyPulseUrl)
Línea 28... Línea 28...
28
  }, [])
28
  }, [])
29
 
29
 
30
  return (
30
  return (