Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7077 Rev 7078
Línea 65... Línea 65...
65
      if (!success) {
65
      if (!success) {
66
        dispatch(addNotification({ style: 'danger', msg: data }))
66
        dispatch(addNotification({ style: 'danger', msg: data }))
67
        return
67
        return
68
      }
68
      }
Línea 69... Línea -...
69
 
-
 
70
      const typeIndex = reactionsOptions.findIndex(
-
 
71
        (option) => option.type === type
-
 
72
      )
-
 
73
 
69
 
74
      onChange(data.reactions)
-
 
75
      setReactionIndex(typeIndex)
70
      onChange(data.reactions)
76
    })
71
    })
Línea 77... Línea 72...
77
  }
72
  }
78
 
73
 
Línea 115... Línea 110...
115
    >
110
    >
116
      {reactionsOptions[reactionIndex].icon}
111
      {reactionsOptions[reactionIndex].icon}
117
      {withLabel && reactionsOptions[reactionIndex].label}
112
      {withLabel && reactionsOptions[reactionIndex].label}
Línea 118... Línea 113...
118
 
113
 
119
      <div className={`reactions ${showReactions ? 'active' : ''}`}>
114
      <div className={`reactions ${showReactions ? 'active' : ''}`}>
120
        {reactionsOptions.map(({ icon, type, label }) => (
115
        {reactionsOptions.map(({ icon, type, label }, index) => (
121
          <button
116
          <button
122
            key={type}
117
            key={type}
123
            onClick={(e) => {
118
            onClick={(e) => {
124
              e.stopPropagation()
119
              e.stopPropagation()
-
 
120
              saveReaction(type)
125
              saveReaction(type)
121
              setReactionIndex(index)
126
            }}
122
            }}
127
            title={label}
123
            title={label}
128
          >
124
          >
129
            {icon}
125
            {icon}