Rev 2900 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React, { useMemo } from 'react'import { styled } from '@mui/material'import { REACTIONS } from '@constants/feed'const ReactionsGroup = styled('div')(() => ({display: 'flex',alignItems: 'center',cursor: 'pointer'}))export default function ReactionsIcons({ reactions = [] }) {const icons = useMemo(() =>REACTIONS.filter(({ type }) =>reactions.some(({ reaction }) => type === reaction)),[reactions])return (<ReactionsGroup>{icons.map(({ icon: Icon, color, label }) => (<Icon key={label} style={{ color }} />))}</ReactionsGroup>)}