Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7209 Rev 7211
Línea 1... Línea 1...
1
import React, { useEffect } from 'react'
1
import React, { useEffect } from 'react'
2
import { axios } from '../../utils'
2
import { axios } from '../../utils'
3
import { useLocation, useParams } from 'react-router-dom'
3
import { useLocation } from 'react-router-dom'
4
import { addNotification } from '../../redux/notification/notification.actions'
4
import { addNotification } from '../../redux/notification/notification.actions'
5
import { useDispatch } from 'react-redux'
5
import { useDispatch } from 'react-redux'
Línea 6... Línea 6...
6
 
6
 
7
const MyCoachViewPage = () => {
7
const MyCoachViewPage = () => {
8
  const dispatch = useDispatch()
8
  const dispatch = useDispatch()
9
  const { pathname } = useLocation()
-
 
Línea 10... Línea 9...
10
  const { uuid } = useParams()
9
  const { pathname } = useLocation()
11
 
10
 
12
  const getQuestion = () => {
11
  const getQuestion = () => {
13
    axios
12
    axios
14
      .get(`${pathname}/${uuid}`, {
13
      .get(pathname, {
15
        headers: {
14
        headers: {
16
          'Content-Type': 'application/json',
15
          'Content-Type': 'application/json',
17
        },
16
        },