Fix issue where channel upload viewcounts were creating a new line #7154
2 changed files with 8 additions and 8 deletions
|
@ -180,6 +180,10 @@ function ClaimPreviewTile(props: Props) {
|
|||
return null;
|
||||
}
|
||||
|
||||
const isChannelPage = window.location.pathname.startsWith('/@');
|
||||
|
||||
const shouldShowViewCount = !(!viewCount || (claim && claim.repost_url) || isLivestream || !isChannelPage);
|
||||
|
||||
if (placeholder || (!claim && isResolvingUri)) {
|
||||
return (
|
||||
<li className={classnames('claim-preview--tile', {})}>
|
||||
|
@ -188,7 +192,9 @@ function ClaimPreviewTile(props: Props) {
|
|||
</div>
|
||||
<div className="placeholder__wrapper">
|
||||
<div className="placeholder claim-tile__title" />
|
||||
<div className="placeholder claim-tile__info" />
|
||||
<div className={classnames('claim-tile__info placeholder', {
|
||||
'contains_view_count': shouldShowViewCount,
|
||||
})} />
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
|
@ -199,10 +205,6 @@ function ClaimPreviewTile(props: Props) {
|
|||
liveProperty = (claim) => <>LIVE</>;
|
||||
}
|
||||
|
||||
const isChannelPage = window.location.pathname.startsWith('/@');
|
||||
|
||||
const shouldShowViewCount = !(!viewCount || (claim && claim.repost_url) || isLivestream || !isChannelPage);
|
||||
|
||||
return (
|
||||
<li
|
||||
onClick={handleClick}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
// import '../../scss/component/_view_count.scss';
|
||||
import '../../scss/component/_view_count.scss';
|
||||
|
||||
type Props = {
|
||||
uri: string,
|
||||
|
@ -38,8 +38,6 @@ export default function FileViewCountInline(props: Props) {
|
|||
// (2) No idea how to get the repost source's claim ID from the repost claim,
|
||||
// so hiding it for now.
|
||||
return null;
|
||||
} else {
|
||||
require('../../scss/component/_view_count.scss');
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue