Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2389 Rev 2390
Línea 2... Línea 2...
2
import { useHistory, useParams } from 'react-router-dom'
2
import { useHistory, useParams } from 'react-router-dom'
3
import { useSelector } from 'react-redux'
3
import { useSelector } from 'react-redux'
4
import { Container, Grid } from '@mui/material'
4
import { Container, Grid } from '@mui/material'
5
import parse from 'html-react-parser'
5
import parse from 'html-react-parser'
Línea -... Línea 6...
-
 
6
 
6
 
7
import { axios } from '@app/utils'
Línea 7... Línea 8...
7
import useFetch from '@app/hooks/useFetch'
8
import useFetch from '@app/hooks/useFetch'
8
 
9
 
9
import Widget from '@app/components/UI/Widget'
10
import Widget from '@app/components/UI/Widget'
10
import SurveyForm from '@app/components/survey-form/SurveyForm'
-
 
Línea 11... Línea 11...
11
import AuthNavbar from '@app/components/UI/auth-navbar'
11
import SurveyForm from '@app/components/survey-form/SurveyForm'
12
import { axios } from '@app/utils'
12
import AuthNavbar from '@app/components/UI/auth-navbar'
13
 
13
 
14
function ShorterPostPage() {
14
function ShorterPostPage() {
15
  const { id } = useParams()
15
  const { id } = useParams()
16
  const history = useHistory()
16
  const history = useHistory()
Línea 17... Línea 17...
17
  const { data } = useFetch(`/shorter/${id}`, null)
17
  const { data } = useFetch(`/shorter/${id}`, null)
18
  const [post, setPost] = useState({})
18
  const [post, setPost] = useState({})
19
  const { isAuth } = useSelector((state) => state.auth)
19
  const { isAuth } = useSelector((state) => state.auth)
Línea 20... Línea 20...
20
 
20
 
-
 
21
  const getPost = async (url) => {
21
  const getPost = async (url) => {
22
    return await axios.get(url).then((res) => res.data.data)
Línea 22... Línea 23...
22
    return await axios.get(url).then((res) => res.data)
23
  }
23
  }
24
 
24
 
25
  useEffect(() => {