From d5f199be668ee2ee2bb16543ff337d28d52fa5a2 Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 10 Jun 2021 16:06:44 -0400 Subject: [PATCH] enable clear edits --- ui/page/collection/index.js | 4 ++-- ui/page/collection/view.jsx | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ui/page/collection/index.js b/ui/page/collection/index.js index 07328a0ea..e9aba72a9 100644 --- a/ui/page/collection/index.js +++ b/ui/page/collection/index.js @@ -13,7 +13,7 @@ import { makeSelectClaimIsPending, makeSelectClaimForClaimId, makeSelectCollectionIsMine, - doLocalCollectionDelete, + doCollectionDelete, doCollectionEdit, makeSelectChannelForClaimUri, makeSelectCountForCollectionId, @@ -50,7 +50,7 @@ const select = (state, props) => { const perform = (dispatch) => ({ fetchCollectionItems: (claimId, cb) => dispatch(doFetchItemsInCollection({ collectionId: claimId }, cb)), // if this collection is not resolved, resolve it - deleteCollection: (id) => dispatch(doLocalCollectionDelete(id)), + deleteCollection: (id, colKey) => dispatch(doCollectionDelete(id, colKey)), editCollection: (id, params) => dispatch(doCollectionEdit(id, params)), }); diff --git a/ui/page/collection/view.jsx b/ui/page/collection/view.jsx index e0874991c..265f7d5b7 100644 --- a/ui/page/collection/view.jsx +++ b/ui/page/collection/view.jsx @@ -6,6 +6,7 @@ import * as PAGES from 'constants/pages'; import { useHistory } from 'react-router-dom'; import CollectionEdit from 'component/collectionEdit'; import Card from 'component/common/card'; +import Button from 'component/button'; import CollectionActions from 'component/collectionActions'; import classnames from 'classnames'; import ClaimAuthor from 'component/claimAuthor'; @@ -32,7 +33,7 @@ type Props = { isMyCollection: boolean, claimIsPending: boolean, collectionHasEdits: boolean, - deleteCollection: (string) => void, + deleteCollection: (string, string) => void, editCollection: (string, CollectionEditParams) => void, fetchCollectionItems: (string, () => void) => void, resolveUris: (string) => void, @@ -51,6 +52,7 @@ export default function CollectionPage(props: Props) { claimIsPending, isResolvingCollection, fetchCollectionItems, + deleteCollection, } = props; const { @@ -83,7 +85,14 @@ export default function CollectionPage(props: Props) { ); - const unpublished = {__('Unpublished Edit')}; + const unpublished = ( +