use correct url for recommended content on vanity claims
This commit is contained in:
parent
a3bcd19c24
commit
f60531183d
1 changed files with 15 additions and 5 deletions
|
@ -97,10 +97,13 @@ class FilePage extends React.Component<Props> {
|
||||||
checkSubscription = (props: Props) => {
|
checkSubscription = (props: Props) => {
|
||||||
if (props.subscriptions.find(sub => sub.channelName === props.claim.channel_name)) {
|
if (props.subscriptions.find(sub => sub.channelName === props.claim.channel_name)) {
|
||||||
props.checkSubscription(
|
props.checkSubscription(
|
||||||
buildURI({
|
buildURI(
|
||||||
contentName: props.claim.channel_name,
|
{
|
||||||
claimId: props.claim.value.publisherSignature.certificateId,
|
contentName: props.claim.channel_name,
|
||||||
}, false)
|
claimId: props.claim.value.publisherSignature.certificateId,
|
||||||
|
},
|
||||||
|
false
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -157,6 +160,13 @@ class FilePage extends React.Component<Props> {
|
||||||
editUri = buildURI(uriObject);
|
editUri = buildURI(uriObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let recommendedUri = uri;
|
||||||
|
if (!recommendedUri.includes('#')) {
|
||||||
|
// at a vanity url
|
||||||
|
// append the claim ID so we can properly strip it out of reccomended videos
|
||||||
|
recommendedUri = `${recommendedUri}#${claim.claim_id}`;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page forContent>
|
<Page forContent>
|
||||||
<section className="content__wrapper">
|
<section className="content__wrapper">
|
||||||
|
@ -241,7 +251,7 @@ class FilePage extends React.Component<Props> {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<RecommendedContent uri={uri} />
|
<RecommendedContent uri={recommendedUri} />
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue