// @flow import React from 'react'; import Button from 'component/button'; import Card from 'component/common/card'; import CollectionSelectItem from './internal/collectionSelectItem'; import FormNewCollection from 'component/formNewCollection'; import * as COLS from 'constants/collections'; import * as ICONS from 'constants/icons'; type Props = { builtin: CollectionList, queue: CollectionList, published: CollectionList, unpublished: CollectionList, closeModal: () => void, // -- redux -- uri: string, }; const ClaimCollectionAdd = (props: Props) => { const { builtin, queue, published, unpublished, closeModal, uri } = props; const [addNewCollection, setAddNewCollection] = React.useState(false); return ( {[...builtin, ...queue].map(({ id }) => ( ))} {unpublished // $FlowFixMe .sort((a, b) => a.name?.localeCompare(b.name)) .map(({ id }) => ( ))} {published // $FlowFixMe .sort((a, b) => a.name?.localeCompare(b.name)) .map(({ id }) => ( ))} } actions={ addNewCollection ? ( setAddNewCollection(false)} /> ) : (
) } /> ); }; export default ClaimCollectionAdd;