import React from 'react'; import {Draggable} from "@hello-pangea/dnd"; import {formatMoney, productStyle} from "./utils"; import {useShopStore} from "./shop_store"; /** * Component that renders a product. * Used in the aside (e.g backlog of product) */ export function ProductItem({card_index}) { const {card, currency, onAddCard} = useShopStore(state => ({ card: state.getCardDescription(card_index), currency: state.currency, onAddCard: state.addCardFromBacklog })); const render_specs = (card.specs && card.specs.length > 0 && (
{card.name_codename}
) : null}