Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5738 Rev 5739
Línea 12... Línea 12...
12
  const outsideClick = useOutsideClick(rectionBtn)
12
  const outsideClick = useOutsideClick(rectionBtn)
Línea 13... Línea 13...
13
 
13
 
14
  const reactions = [
14
  const reactions = [
15
    {
15
    {
16
      type: 'r',
16
      type: 'r',
17
      icon: <RecommendIcon />,
17
      icon: <RecommendIcon style={{ color: '#7405f9' }} />,
18
    },
18
    },
19
    {
19
    {
20
      type: 'f',
20
      type: 'f',
21
      icon: <FavoriteIcon />,
21
      icon: <FavoriteIcon style={{ color: '#E7A33E' }} />,
22
    },
22
    },
23
    {
23
    {
24
      type: 'v',
24
      type: 'v',
25
      icon: <VolunteerActivismIcon />,
25
      icon: <VolunteerActivismIcon style={{ color: '#7FC15E' }} />,
26
    },
26
    },
Línea 27... Línea 27...
27
  ]
27
  ]
Línea -... Línea 28...
-
 
28
 
-
 
29
  const onHover = debounce(() => setShowReactions(true), 1000)
-
 
30
 
-
 
31
  const handleClick = (reaction) => {
-
 
32
    setSettedReaction(reaction)
28
 
33
    setShowReactions(false)
29
  const onHover = debounce(() => setShowReactions(true), 1000)
34
  }
30
 
35
 
31
  useEffect(() => {
36
  useEffect(() => {
32
    if (outsideClick) {
37
    if (outsideClick) {
Línea 46... Línea 51...
46
      )}
51
      )}
47
      <div className={`reactions ${showReactions ? 'active' : ''}`}>
52
      <div className={`reactions ${showReactions ? 'active' : ''}`}>
48
        {reactions.map((reaction) => (
53
        {reactions.map((reaction) => (
49
          <button
54
          <button
50
            key={reaction.type}
55
            key={reaction.type}
51
            onClick={() => setSettedReaction(reaction.type)}
56
            onClick={() => handleClick(reaction.type)}
52
          >
57
          >
53
            {reaction.icon}
58
            {reaction.icon}
54
          </button>
59
          </button>
55
        ))}
60
        ))}
56
      </div>
61
      </div>