import React from 'react'; import {formatPrice} from '../Util/formatters'; import DraggableTableRow from '../Util/DraggableTableRow.jsx'; import { Container, Segment, Grid, Header, Image, Icon, Button, Table, Form, Label, Message, Menu, Tab, Dropdown, Modal, Card, Divider} from 'semantic-ui-react' export default class MediaCollection extends React.Component { constructor(props) { super(props); this.state = { collection: null, a: null }; } async onRemove(productIndex, e) { e.preventDefault(); this.props.onRemoveProduct(productIndex); } render() { if (!(this.props.collection && this.props.collection.products && this.props.collection.products.length > 0)) { return
; } let onReorder = async function(productIndexA, productIndexB) { if (productIndexA >= this.props.collection.products.length || productIndexA < 0) { return; } this.props.onReorderProduct(productIndexA, productIndexB); } return (