fixes per review
This commit is contained in:
parent
ed6b527b8d
commit
a1f58b2a07
2 changed files with 2 additions and 13 deletions
|
@ -8,7 +8,7 @@ import FileListItem from 'component/fileListItem';
|
||||||
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
import FloatingWalletBalance from 'component/floatingWalletBalance';
|
||||||
import UriBar from 'component/uriBar';
|
import UriBar from 'component/uriBar';
|
||||||
import publishStyle from 'styles/publish';
|
import publishStyle from 'styles/publish';
|
||||||
import { __, isClaimInList, navigateToUri } from 'utils/helper';
|
import { __, navigateToUri } from 'utils/helper';
|
||||||
|
|
||||||
class PublishesPage extends React.PureComponent {
|
class PublishesPage extends React.PureComponent {
|
||||||
state = {
|
state = {
|
||||||
|
@ -175,7 +175,7 @@ class PublishesPage extends React.PureComponent {
|
||||||
this.handleSelectItem(item, claim);
|
this.handleSelectItem(item, claim);
|
||||||
} else {
|
} else {
|
||||||
const { notify, pendingClaims } = this.props;
|
const { notify, pendingClaims } = this.props;
|
||||||
if (isClaimInList(claim, pendingClaims)) {
|
if (pendingClaims.some(pendingClaim => pendingClaim.claim_id === claim.claim_id)) {
|
||||||
notify({
|
notify({
|
||||||
message: __('This content is currently pending. It will be available in a few minutes.'),
|
message: __('This content is currently pending. It will be available in a few minutes.'),
|
||||||
});
|
});
|
||||||
|
|
|
@ -346,14 +346,3 @@ export function uploadImageAsset(filePath, success, failure) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This method already exists elsewhere?
|
|
||||||
export function isClaimInList(claim, claims = []) {
|
|
||||||
for (let i = 0; i < claims.length; i++) {
|
|
||||||
if (claims[i].claim_id === claim.claim_id) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue