mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Only display custom rows that exist and have items
This commit is contained in:
parent
737a53294d
commit
8df5e41991
1 changed files with 13 additions and 4 deletions
|
@ -130,7 +130,10 @@ var Splash = injectIntl(React.createClass({
|
|||
);
|
||||
}
|
||||
|
||||
if (this.state.session.user) {
|
||||
if (
|
||||
this.state.session.user &&
|
||||
this.state.featuredGlobal.community_newest_projects &&
|
||||
this.state.featuredGlobal.community_newest_projects.length > 0) {
|
||||
rows.push(
|
||||
<Box
|
||||
title={
|
||||
|
@ -143,7 +146,9 @@ var Splash = injectIntl(React.createClass({
|
|||
);
|
||||
}
|
||||
|
||||
if (this.state.featuredCustom.custom_projects_by_following) {
|
||||
if (
|
||||
this.state.featuredCustom.custom_projects_by_following &&
|
||||
this.state.featuredCustom.custom_projects_by_following.length > 0) {
|
||||
rows.push(
|
||||
<Box
|
||||
title={
|
||||
|
@ -155,7 +160,9 @@ var Splash = injectIntl(React.createClass({
|
|||
</Box>
|
||||
);
|
||||
}
|
||||
if (this.state.featuredCustom.custom_projects_loved_by_following) {
|
||||
if (
|
||||
this.state.featuredCustom.custom_projects_loved_by_following &&
|
||||
this.state.featuredCustom.custom_projects_loved_by_following.length > 0) {
|
||||
rows.push(
|
||||
<Box
|
||||
title={
|
||||
|
@ -168,7 +175,9 @@ var Splash = injectIntl(React.createClass({
|
|||
);
|
||||
}
|
||||
|
||||
if (this.state.featuredCustom.custom_projects_in_studios_following) {
|
||||
if (
|
||||
this.state.featuredCustom.custom_projects_in_studios_following &&
|
||||
this.state.featuredCustom.custom_projects_in_studios_following.length > 0) {
|
||||
rows.push(
|
||||
<Box
|
||||
title={
|
||||
|
|
Loading…
Reference in a new issue