// @flow // $FlowFixMe import { DragDropContext, Droppable } from 'react-beautiful-dnd'; import React from 'react'; import classnames from 'classnames'; import ClaimList from 'component/claimList'; import Card from 'component/common/card'; import Button from 'component/button'; import * as PAGES from 'constants/pages'; import * as COLLECTIONS_CONSTS from 'constants/collections'; import Icon from 'component/common/icon'; import * as ICONS from 'constants/icons'; type Props = { id: string, url: string, isMyCollection: boolean, collectionUrls: Array, collectionName: string, collection: any, loop: boolean, shuffle: boolean, doToggleLoopList: (string, boolean) => void, doToggleShuffleList: (string, string, boolean) => void, createUnpublishedCollection: (string, Array, ?string) => void, doCollectionEdit: (string, CollectionEditParams) => void, }; export default function CollectionContent(props: Props) { const { isMyCollection, collectionUrls, collectionName, id, url, loop, shuffle, doToggleLoopList, doToggleShuffleList, doCollectionEdit, } = props; const [showEdit, setShowEdit] = React.useState(false); function handleOnDragEnd(result) { const { source, destination } = result; if (!destination) return; const { index: from } = source; const { index: to } = destination; doCollectionEdit(id, { order: { from, to } }); } return ( {collectionName}