Actually hide NSFW content #1748
2 changed files with 9 additions and 4 deletions
|
@ -7,6 +7,7 @@ import Button from 'component/button';
|
|||
import FileList from 'component/fileList';
|
||||
import type { Claim } from 'types/claim';
|
||||
import isDev from 'electron-is-dev';
|
||||
import HiddenNsfwClaims from 'component/hiddenNsfwClaims';
|
||||
|
||||
type Props = {
|
||||
doFetchClaimsByChannel: (string, number) => void,
|
||||
|
@ -51,9 +52,10 @@ export default class extends React.PureComponent<Props> {
|
|||
if (claim.claims.length) {
|
||||
subscriptionClaimMap[claim.uri] = 1;
|
||||
} else if (isDev) {
|
||||
console.error(
|
||||
`claim for ${claim.uri} was added to byId in redux but there are no loaded fetched claims`
|
||||
);
|
||||
console
|
||||
.error
|
||||
// `claim for ${claim.uri} was added to byId in redux but there are no loaded fetched claims`
|
||||
();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -72,6 +74,8 @@ export default class extends React.PureComponent<Props> {
|
|||
claimList = claimList.concat(claimData.claims);
|
||||
});
|
||||
|
||||
const subscriptionUris = claimList.map(claim => `lbry://${claim.name}#${claim.claim_id}`);
|
||||
|
||||
return (
|
||||
<Page notContained loading={isFetchingSubscriptions}>
|
||||
{!subscriptions.length && (
|
||||
|
@ -83,6 +87,7 @@ export default class extends React.PureComponent<Props> {
|
|||
</div>
|
||||
)}
|
||||
{!!claimList.length && <FileList hideFilter sortByHeight fileInfos={claimList} />}
|
||||
<HiddenNsfwClaims uris={subscriptionUris} />
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -357,7 +357,7 @@
|
|||
.card {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: 60px;
|
||||
margin-bottom: $spacing-vertical * 3/2;
|
||||
|
||||
@media only screen and (max-width: $medium-breakpoint) {
|
||||
width: calc((100% / 4) - (60px / 4)); // 60px === 20px margin-right * three cards
|
||||
|
|
Loading…
Reference in a new issue