Keep just More From for now
This commit is contained in:
parent
6718d87848
commit
1d74b364e5
2 changed files with 1 additions and 57 deletions
|
@ -1,7 +1,6 @@
|
|||
// @flow
|
||||
import { SHOW_ADS, SIMPLE_SITE } from 'config';
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import ClaimList from 'component/claimList';
|
||||
import ClaimListDiscover from 'component/claimListDiscover';
|
||||
import Ads from 'web/component/ads';
|
||||
|
@ -31,12 +30,6 @@ export default function RecommendedContent(props: Props) {
|
|||
} = props;
|
||||
const [expanded, setExpanded] = React.useState(false);
|
||||
const [allRelated, setAllRelated] = React.useState(true);
|
||||
const [moreFrom, setMoreFrom] = React.useState(false);
|
||||
const [tagList, setTagList] = React.useState(false);
|
||||
const signingChannel = claim && claim.signing_channel;
|
||||
const channelName = signingChannel ? signingChannel.name : null;
|
||||
const claimValue = claim && claim.value;
|
||||
const tags = claimValue ? claimValue.tags : null;
|
||||
const isMobile = useIsMobile();
|
||||
const isMedium = useIsMediumScreen();
|
||||
|
||||
|
@ -93,24 +86,6 @@ export default function RecommendedContent(props: Props) {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
{tags &&
|
||||
(expanded ? (
|
||||
<Button button="link" label={__('Less')} onClick={() => setExpanded(!expanded)} />
|
||||
) : (
|
||||
<Button button="link" label={__('More')} onClick={() => setExpanded(!expanded)} />
|
||||
))}
|
||||
{tags &&
|
||||
tags.map((name) => (
|
||||
<Button
|
||||
button="alt"
|
||||
label={__(`${name}`)}
|
||||
onClick={() => {
|
||||
setAllRelated(false);
|
||||
setMoreFrom(false);
|
||||
setTagList(name);
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
}
|
||||
body={
|
||||
|
@ -163,31 +138,6 @@ export default function RecommendedContent(props: Props) {
|
|||
empty={__('No related content found')}
|
||||
/>
|
||||
)}
|
||||
{tagList && (
|
||||
<ClaimListDiscover
|
||||
hideAdvancedFilter={true}
|
||||
type="small"
|
||||
claimType={['stream']}
|
||||
feeAmount="0"
|
||||
pageSize={20}
|
||||
infiniteScroll={false}
|
||||
tags={[tagList]}
|
||||
loading={isSearching}
|
||||
hideMenu={isMobile}
|
||||
injectedItem={
|
||||
SHOW_ADS && IS_WEB ? (
|
||||
SIMPLE_SITE ? (
|
||||
<Ads small type={'google'} uri={uri} />
|
||||
) : (
|
||||
!isAuthenticated && <Ads small type={'video'} />
|
||||
)
|
||||
) : (
|
||||
false
|
||||
)
|
||||
}
|
||||
empty={__('No related content found')}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
|
|
@ -265,13 +265,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.related_content-more--contracted {
|
||||
margin: calc(var(--spacing-s) * -1) 0;
|
||||
height: calc(var(--height-button) * 0.9);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.related_content-more--expanded {
|
||||
.related_content-more {
|
||||
margin: calc(var(--spacing-s) * -1) 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue