Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2188 Rev 2189
Línea 37... Línea 37...
37
 
37
 
38
  const displayCommentSection = () => {
38
  const displayCommentSection = () => {
39
    setShowComments(!showComments)
39
    setShowComments(!showComments)
Línea 40... Línea 40...
40
  }
40
  }
41
 
41
 
42
  const getComments = () => {
42
  const getComments = (url) => {
Línea 43... Línea 43...
43
    axios.get(post.comments_url).then((response) => {
43
    axios.get(url).then((response) => {
44
      const { data, success } = response.data
44
      const { data, success } = response.data
45
 
45
 
Línea 126... Línea 126...
126
        )
126
        )
127
      })
127
      })
128
  }, [pathname])
128
  }, [pathname])
Línea 129... Línea 129...
129
 
129
 
130
  useEffect(() => {
130
  useEffect(() => {
131
    getComments()
131
    if (post.comments_url) getComments(post.comments_url)
Línea 132... Línea 132...
132
  }, [post])
132
  }, [post])
133
 
133
 
134
  return (
134
  return (