lbry-desktop/ui/component/claimRepostAuthor/view.jsx
jessopb 3034f4ce6c
bring in styles (#7542)
* bring in ody styles; modify; cleanup

* workflow

* workflow

* v0.52.6-alpha.teststyles.1

* fix hook

* v0.52.6-alpha.teststyles.2

* style fixes

* fix pagination styling

* v0.52.6-alpha.teststyles.3

* wallet icon was bad

* restore deploy script

* fixes

* fix player close button

* modal inputs

* cleanup

* cleanup

* fix staked indicator

* fix profile menu button skel delay

* fix view-all-playlists hover

* fix overlay buttons on collection page

* fix header buttons
2022-04-17 13:04:56 -04:00

64 lines
1.6 KiB
JavaScript

// @flow
import * as ICONS from 'constants/icons';
import React from 'react';
import I18nMessage from 'component/i18nMessage';
import UriIndicator from 'component/uriIndicator';
import Icon from 'component/common/icon';
type Props = {
uri: string,
claim: ?Claim,
short: boolean,
};
function ClaimRepostAuthor(props: Props) {
const { claim, short } = props;
const repostChannelUrl = claim && claim.repost_channel_url;
const repostUrl = claim && claim.repost_url;
if (short && repostUrl) {
return (
<span className="claim-preview__repost-author">
<div className="claim-preview__repost-ribbon">
<Icon icon={ICONS.REPOST} size={12} />
<br />
<span>{repostUrl}</span>
</div>
</span>
);
}
if (repostUrl && !repostChannelUrl) {
return (
<div className="claim-preview__repost-author">
<Icon icon={ICONS.REPOST} size={10} />
<span>
<I18nMessage
tokens={{
anonymous: <strong>{__('Anonymous --[used in <%anonymous% Reposted>]--')}</strong>,
}}
>
%anonymous% Reposted
</I18nMessage>
</span>
</div>
);
}
if (!repostUrl) {
return null;
}
return (
<div className="claim-preview__repost-author">
<div className="claim-preview__repost-ribbon">
<Icon icon={ICONS.REPOST} size={10} className="claim-preview__repost-icon" />
<br />
<I18nMessage tokens={{ repost_channel_link: <UriIndicator link uri={repostChannelUrl} /> }}>
%repost_channel_link%
</I18nMessage>
</div>
</div>
);
}
export default ClaimRepostAuthor;