king
2020-01-17 a0a285c90987eb9b1591f90333f3aeb15659ded2
src/components/sidemenu/menuelement/card.jsx
@@ -4,7 +4,7 @@
import ItemTypes from './itemtypes'
import './index.scss'
const Card = ({ id, icon, text, menutype, moveCard, findCard, editCard, closeCard }) => {
const Card = ({ id, card, moveCard, findCard, editCard, closeCard }) => {
  const originalIndex = findCard(id).index
  const [{ isDragging }, drag] = useDrag({
    item: { type: ItemTypes.CARD, id, originalIndex },
@@ -34,10 +34,10 @@
  return (
    <div className="side-card" style={{ opacity }}>
      <div ref={node => drag(drop(node))}>
        {icon && <Icon type={icon} />}
        {text}
        {card.PageParam && card.PageParam.Icon && <Icon type={card.PageParam.Icon} />}
        {card.text}
      </div>
      {menutype === 'CommonTable' ? <Icon className="edit" type="edit" onClick={edit} /> : null}
      {!card.forbidden ? <Icon className="edit" type="edit" onClick={edit} /> : null}
      <Icon className="close" type="close" onClick={close} />
    </div>
  )