From 7667c98cf033547ab946b6ce8c6de686f3552aab Mon Sep 17 00:00:00 2001 From: zeppi Date: Wed, 23 Jun 2021 11:04:53 -0400 Subject: [PATCH] disable edits while pending --- ui/component/claimPreview/index.js | 2 ++ ui/component/claimPreview/view.jsx | 7 +++++-- ui/page/collection/view.jsx | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/component/claimPreview/index.js b/ui/component/claimPreview/index.js index 611e60e20..5346c7ea8 100644 --- a/ui/component/claimPreview/index.js +++ b/ui/component/claimPreview/index.js @@ -15,6 +15,7 @@ import { doCollectionEdit, makeSelectUrlsForCollectionId, makeSelectIndexForUrlInCollection, + makeSelectClaimIdIsPending, } from 'lbry-redux'; import { selectMutedChannels, makeSelectChannelIsMuted } from 'redux/selectors/blocked'; import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; @@ -47,6 +48,7 @@ const select = (state, props) => ({ isCollectionMine: makeSelectCollectionIsMine(props.collectionId)(state), collectionUris: makeSelectUrlsForCollectionId(props.collectionId)(state), collectionIndex: makeSelectIndexForUrlInCollection(props.uri, props.collectionId)(state), + collectionIsPending: makeSelectClaimIdIsPending(props.collectionId)(state), }); const perform = (dispatch) => ({ diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index a69742968..2986ee694 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -79,6 +79,7 @@ type Props = { collectionUris: Array, collectionIndex?: number, disableNavigation?: boolean, + collectionIsPending?: boolean, }; const ClaimPreview = forwardRef((props: Props, ref: any) => { @@ -135,6 +136,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { editCollection, isCollectionMine, collectionUris, + collectionIsPending, disableNavigation, } = props; const isRepost = claim && claim.repost_channel_url; @@ -346,7 +348,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => {