Re-ran prettier
This commit is contained in:
parent
6e293fd04b
commit
1e1c494367
3 changed files with 33 additions and 6 deletions
|
@ -40,7 +40,13 @@ class FilePage extends React.PureComponent {
|
|||
props.checkSubscriptionLatest(
|
||||
{
|
||||
channelName: props.claim.channel_name,
|
||||
uri: buildURI({ contentName: props.claim.channel_name, claimId: props.claim.value.publisherSignature.certificateId }, false),
|
||||
uri: buildURI(
|
||||
{
|
||||
contentName: props.claim.channel_name,
|
||||
claimId: props.claim.value.publisherSignature.certificateId,
|
||||
},
|
||||
false
|
||||
),
|
||||
},
|
||||
buildURI({ contentName: props.claim.name, claimId: props.claim.claim_id }, false)
|
||||
);
|
||||
|
|
|
@ -365,7 +365,13 @@ export function doFetchClaimsByChannel(uri, page) {
|
|||
setSubscriptionLatest(
|
||||
{
|
||||
channelName: latest.channel_name,
|
||||
uri: buildURI({ contentName: latest.channel_name, claimId: latest.value.publisherSignature.certificateId }, false),
|
||||
uri: buildURI(
|
||||
{
|
||||
contentName: latest.channel_name,
|
||||
claimId: latest.value.publisherSignature.certificateId,
|
||||
},
|
||||
false
|
||||
),
|
||||
},
|
||||
buildURI({ contentName: latest.name, claimId: latest.claim_id }, false)
|
||||
)
|
||||
|
|
|
@ -51,7 +51,10 @@ export const doCheckSubscription = (subscription: Subscription) => (dispatch: Di
|
|||
let count = subscription.latest
|
||||
? claimsInChannel.reduce(
|
||||
(prev, cur, index) =>
|
||||
buildURI({ contentName: cur.name, claimId: cur.claim_id}, false) === subscription.latest ? index : prev,
|
||||
buildURI({ contentName: cur.name, claimId: cur.claim_id }, false) ===
|
||||
subscription.latest
|
||||
? index
|
||||
: prev,
|
||||
-1
|
||||
)
|
||||
: 1;
|
||||
|
@ -59,7 +62,13 @@ export const doCheckSubscription = (subscription: Subscription) => (dispatch: Di
|
|||
if (count !== 0) {
|
||||
if (!claimsInChannel[0].value.stream.metadata.fee) {
|
||||
dispatch(
|
||||
doPurchaseUri(buildURI({ contentName: claimsInChannel[0].name, claimId: claimsInChannel[0].claim_id }, false), { cost: 0 })
|
||||
doPurchaseUri(
|
||||
buildURI(
|
||||
{ contentName: claimsInChannel[0].name, claimId: claimsInChannel[0].claim_id },
|
||||
false
|
||||
),
|
||||
{ cost: 0 }
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -72,7 +81,10 @@ export const doCheckSubscription = (subscription: Subscription) => (dispatch: Di
|
|||
notif.onclick = () => {
|
||||
dispatch(
|
||||
doNavigate('/show', {
|
||||
uri: buildURI({ contentName: claimsInChannel[0].name, claimId: claimsInChannel[0].claim_id }, true),
|
||||
uri: buildURI(
|
||||
{ contentName: claimsInChannel[0].name, claimId: claimsInChannel[0].claim_id },
|
||||
true
|
||||
),
|
||||
})
|
||||
);
|
||||
};
|
||||
|
@ -96,7 +108,10 @@ export const checkSubscriptionLatest = (channel: Subscription, uri: string) => (
|
|||
if (
|
||||
claimsInChannel &&
|
||||
claimsInChannel.length &&
|
||||
buildURI({ contentName: claimsInChannel[0].name, claimId: claimsInChannel[0].claim_id }, false) === uri
|
||||
buildURI(
|
||||
{ contentName: claimsInChannel[0].name, claimId: claimsInChannel[0].claim_id },
|
||||
false
|
||||
) === uri
|
||||
) {
|
||||
dispatch(setSubscriptionLatest(channel, uri));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue