Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 2241 Rev 2246
Línea 55... Línea 55...
55
      () => REACTIONS.find((r) => r.type === currentReactionType),
55
      () => REACTIONS.find((r) => r.type === currentReactionType),
56
      [currentReactionType]
56
      [currentReactionType]
57
    )
57
    )
58
    const Icon = currentReaction ? currentReaction.icon : REACTIONS[0].icon
58
    const Icon = currentReaction ? currentReaction.icon : REACTIONS[0].icon
Línea -... Línea 59...
-
 
59
 
-
 
60
    const handleHover = () => setIsHover(!isHover)
59
 
61
 
60
    const saveReaction = useCallback(
62
    const saveReaction = useCallback(
61
      (type = 'r') => {
63
      (type = 'r') => {
62
        const formData = new FormData()
64
        const formData = new FormData()
Línea 91... Línea 93...
91
      })
93
      })
92
    }, [])
94
    }, [])
Línea 93... Línea 95...
93
 
95
 
94
    return (
96
    return (
95
      <Component
97
      <Component
96
        onClick={() => (currentReaction ? deleteReaction() : saveReaction())}
-
 
97
        onMouseOver={() => setIsHover(true)}
-
 
98
        onMouseOut={() => setIsHover(false)}
98
        onClick={() => (currentReaction ? deleteReaction : handleHover)}
99
      >
99
      >
100
        {currentReaction ? (
100
        {currentReaction ? (
101
          <Icon style={{ color: currentReaction.color }} />
101
          <Icon style={{ color: currentReaction.color }} />
102
        ) : (
102
        ) : (