Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7113 Rev 7118
Línea 1... Línea -...
1
/* eslint-disable react/prop-types */
-
 
2
import React, { useEffect, useState } from 'react'
1
import React, { useEffect, useState } from 'react'
3
import parse from 'html-react-parser'
2
import parse from 'html-react-parser'
4
import { axios } from '../../utils'
3
import { axios } from '../../utils'
5
import { useDispatch } from 'react-redux'
4
import { useDispatch } from 'react-redux'
6
import { setIntlLabels } from '../../redux/intl/intl.action'
5
import { setIntlLabels } from '../../redux/intl/intl.action'
Línea 108... Línea 107...
108
    }
107
    }
109
    return <p>{fullText}</p>
108
    return <p>{fullText}</p>
110
  }
109
  }
Línea 111... Línea 110...
111
 
110
 
112
  const saveReaction = (type) => {
-
 
113
    const reactionTypesUrl = {
-
 
114
      r: post.save_reaction_recommended_url,
-
 
115
      s: post.save_reaction_support_url,
-
 
116
      l: post.save_reaction_love_url,
-
 
117
      i: post.save_reaction_interest_url,
-
 
118
      f: post.save_reaction_fun_url,
-
 
119
    }
-
 
120
 
111
  const saveReaction = (type) => {
121
    axios.post(reactionTypesUrl[type]).then((res) => {
112
    axios.post(post.save_reaction_url).then((res) => {
Línea 122... Línea 113...
122
      const { success, data } = res.data
113
      const { success, data } = res.data
123
 
114
 
124
      if (!success) {
115
      if (!success) {