fix spacing

This commit is contained in:
Sean Yesmunt 2018-07-24 21:10:33 -04:00
parent 95fee660ad
commit a7c6135afd
5 changed files with 11 additions and 11 deletions

View file

@ -1,14 +1,10 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { doFetchClaimsByChannel } from 'redux/actions/content'; import { doFetchClaimsByChannel } from 'redux/actions/content';
import { import { makeSelectClaimsInChannelForCurrentPage } from 'lbry-redux';
makeSelectClaimsInChannelForCurrentPage,
makeSelectFetchingChannelClaims,
} from 'lbry-redux';
import RecommendedVideos from './view'; import RecommendedVideos from './view';
const select = (state, props) => ({ const select = (state, props) => ({
claimsInChannel: makeSelectClaimsInChannelForCurrentPage(props.channelUri)(state), claimsInChannel: makeSelectClaimsInChannelForCurrentPage(props.channelUri)(state),
fetching: makeSelectFetchingChannelClaims(props.channelUri)(state),
}); });
const perform = dispatch => ({ const perform = dispatch => ({

View file

@ -8,24 +8,23 @@ import type { Claim } from 'types/claim';
type Props = { type Props = {
channelUri: ?string, channelUri: ?string,
claimsInChannel: ?Array<Claim>, claimsInChannel: ?Array<Claim>,
fetching: boolean,
fetchClaims: (string, number) => void, fetchClaims: (string, number) => void,
}; };
export default class RecommendedVideos extends React.PureComponent<Props> { export default class RecommendedVideos extends React.PureComponent<Props> {
componentDidMount() { componentDidMount() {
const { channelUri, fetchClaims, claimsInChannel } = this.props; const { channelUri, fetchClaims, claimsInChannel } = this.props;
if (!claimsInChannel) { if (channelUri && !claimsInChannel) {
fetchClaims(channelUri, 1); fetchClaims(channelUri, 1);
} }
} }
render() { render() {
const { claimsInChannel, fetching } = this.props; const { claimsInChannel } = this.props;
return ( return (
<div className="card__list--recommended"> <div className="card__list--recommended">
<FormRow alignRight> <FormRow>
<ToolTip onComponent body={__('Automatically download and play free content.')}> <ToolTip onComponent body={__('Automatically download and play free content.')}>
<FormField <FormField
useToggle useToggle
@ -38,7 +37,6 @@ export default class RecommendedVideos extends React.PureComponent<Props> {
/> />
</ToolTip> </ToolTip>
</FormRow> </FormRow>
{fetching && <div>Loading</div>}
{claimsInChannel && {claimsInChannel &&
claimsInChannel.map(({ permanent_url: permanentUrl }) => ( claimsInChannel.map(({ permanent_url: permanentUrl }) => (
<FileTile <FileTile

View file

@ -422,7 +422,11 @@
} }
.card__list--recommended { .card__list--recommended {
min-width: 300px;
flex-basis: auto; /* default value */
flex-grow: 1;
padding-left: $spacing-width; padding-left: $spacing-width;
.card { .card {
display: block; display: block;
} }

View file

@ -1,5 +1,7 @@
.content__wrapper { .content__wrapper {
width: 740px; min-width: 400px;
flex-basis: auto; /* default value */
flex-grow: 1;
} }
.content__embedded { .content__embedded {