Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5771 Rev 5772
Línea 8... Línea 8...
8
import useOutsideClick from '../../../hooks/useOutsideClick'
8
import useOutsideClick from '../../../hooks/useOutsideClick'
9
import { addNotification } from '../../../redux/notification/notification.actions'
9
import { addNotification } from '../../../redux/notification/notification.actions'
10
import { useDispatch } from 'react-redux'
10
import { useDispatch } from 'react-redux'
Línea 11... Línea 11...
11
 
11
 
12
export const ReactionButton = ({
12
export const ReactionButton = ({
13
  feed_save_reaction_recommended_url,
13
  saveReactionRecommendedUrl,
14
  feed_save_reaction_support_url,
14
  saveReactionSupportUrl,
15
  feed_save_reaction_love_url,
15
  saveReactionLoveUrl,
16
  feed_save_reaction_interest_url,
16
  saveReactionInterestUrl,
-
 
17
  saveReactionFunUrl,
17
  feed_save_reaction_fun_url,
18
  myReaction,
18
}) => {
19
}) => {
19
  const [settedReaction, setSettedReaction] = useState(null)
20
  const [settedReaction, setSettedReaction] = useState(myReaction)
20
  const [showReactions, setShowReactions] = useState(false)
21
  const [showReactions, setShowReactions] = useState(false)
21
  const rectionBtn = useRef(null)
22
  const rectionBtn = useRef(null)
22
  const outsideClick = useOutsideClick(rectionBtn)
23
  const outsideClick = useOutsideClick(rectionBtn)
Línea 23... Línea 24...
23
  const dispatch = useDispatch()
24
  const dispatch = useDispatch()
24
 
25
 
25
  const reactions = [
26
  const reactions = [
26
    {
27
    {
27
      type: 'r',
28
      type: 'r',
28
      icon: <RecommendIcon style={{ color: '#7405f9' }} />,
29
      icon: <RecommendIcon style={{ color: '#7405f9' }} />,
29
      url: feed_save_reaction_recommended_url,
30
      url: saveReactionRecommendedUrl,
30
    },
31
    },
31
    {
32
    {
32
      type: 's',
33
      type: 's',
33
      icon: <VolunteerActivismIcon style={{ color: '#6495ED' }} />,
34
      icon: <VolunteerActivismIcon style={{ color: '#6495ED' }} />,
34
      url: feed_save_reaction_support_url,
35
      url: saveReactionSupportUrl,
35
    },
36
    },
36
    {
37
    {
37
      type: 'l',
38
      type: 'l',
38
      icon: <FavoriteIcon style={{ color: '#DF704D' }} />,
39
      icon: <FavoriteIcon style={{ color: '#DF704D' }} />,
39
      url: feed_save_reaction_love_url,
40
      url: saveReactionLoveUrl,
40
    },
41
    },
41
    {
42
    {
42
      type: 'i',
43
      type: 'i',
43
      icon: (
44
      icon: (
44
        <TungstenIcon
45
        <TungstenIcon
45
          style={{ color: '#F5BB5C', transform: 'rotate(180deg)' }}
46
          style={{ color: '#F5BB5C', transform: 'rotate(180deg)' }}
46
        />
47
        />
47
      ),
48
      ),
48
      url: feed_save_reaction_interest_url,
49
      url: saveReactionInterestUrl,
49
    },
50
    },
50
    {
51
    {
51
      type: 'f',
52
      type: 'f',
52
      icon: <EmojiEmotionsIcon style={{ color: '#FF7F50' }} />,
53
      icon: <EmojiEmotionsIcon style={{ color: '#FF7F50' }} />,
53
      url: feed_save_reaction_fun_url,
54
      url: saveReactionFunUrl,
Línea 54... Línea 55...
54
    },
55
    },
55
  ]
56
  ]