Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 767 Rev 768
Línea 1... Línea 1...
1
import React, { useCallback } from 'react'
1
import React, { useCallback } from 'react'
2
import { useDispatch } from 'react-redux'
2
import { useDispatch } from 'react-redux'
3
import { axios } from '../utils'
3
import { axios } from '../utils'
4
import { addNotification } from 'store/notification/notification.actions'
4
import { addNotification } from 'store/notification/notification.actions'
-
 
5
import { Recommend } from '@mui/icons-material'
Línea 5... Línea 6...
5
 
6
 
6
import FunIcon from '../components/UI/icons/Fun'
7
import FunIcon from '../components/UI/icons/Fun'
7
import LoveItIcon from '../components/UI/icons/LoveIt'
8
import LoveItIcon from '../components/UI/icons/LoveIt'
8
import SupportIcon from '../components/UI/icons/Support'
9
import SupportIcon from '../components/UI/icons/Support'
Línea 83... Línea 84...
83
      })
84
      })
84
    }, [])
85
    }, [])
Línea 85... Línea 86...
85
 
86
 
86
    return (
87
    return (
87
      <Component
88
      <Component
88
        icon={currentReaction ? reactions[currentReaction].icon : RecommendIcon}
89
        icon={currentReaction ? reactions[currentReaction].icon : Recommend}
89
        onClick={() =>
90
        onClick={() =>
90
          currentReaction ? deleteReaction() : saveReaction(reactions.r.type)
91
          currentReaction ? deleteReaction() : saveReaction(reactions.r.type)
91
        }
92
        }
92
        label={
93
        label={
Línea 98... Línea 99...
98
            <button
99
            <button
99
              key={type}
100
              key={type}
100
              title={label}
101
              title={label}
101
              onClick={(e) => {
102
              onClick={(e) => {
102
                e.stopPropagation()
103
                e.stopPropagation()
103
                saveReaction(type)
-
 
104
                e.currentTarget.blur()
104
                e.currentTarget.blur()
-
 
105
                saveReaction(type)
105
              }}
106
              }}
106
            >
107
            >
107
              <Icon />
108
              <Icon />
108
            </button>
109
            </button>
109
          ))}
110
          ))}