File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,12 @@ export function InfiniteHubStories({
95
95
) ;
96
96
} ) }
97
97
</ div >
98
- < PageTitle
99
- className = { styles . title }
100
- title = { formatMessage ( translations . homepage . latestStories ) }
101
- />
98
+ { data . length > 0 && (
99
+ < PageTitle
100
+ className = { styles . title }
101
+ title = { formatMessage ( translations . homepage . latestStories ) }
102
+ />
103
+ ) }
102
104
< StoriesList
103
105
fullWidthFeaturedStory = { false }
104
106
isCategoryList
@@ -109,6 +111,7 @@ export function InfiniteHubStories({
109
111
showSubtitle = { showSubtitle }
110
112
stories = { data }
111
113
storyCardVariant = { storyCardVariant }
114
+ withEmptyState = { false }
112
115
/>
113
116
114
117
{ ! done && (
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ type Props = {
30
30
showSubtitle : boolean ;
31
31
stories : ListStory [ ] ;
32
32
storyCardVariant : ThemeSettings [ 'story_card_variant' ] ;
33
+ withEmptyState ?: boolean ;
33
34
} ;
34
35
35
36
export function StoriesList ( {
@@ -44,6 +45,7 @@ export function StoriesList({
44
45
showSubtitle,
45
46
stories,
46
47
storyCardVariant,
48
+ withEmptyState = true ,
47
49
} : Props ) {
48
50
const locale = useLocale ( ) ;
49
51
const hasCategories = categories . length > 0 ;
@@ -64,7 +66,7 @@ export function StoriesList({
64
66
65
67
const getStoryCardSize = useStoryCardLayout ( isCategoryList ) ;
66
68
67
- if ( ! highlightedStories . length && ! restStories . length ) {
69
+ if ( withEmptyState && ! highlightedStories . length && ! restStories . length ) {
68
70
return (
69
71
< div className = { styles . noStories } >
70
72
< Illustration />
You can’t perform that action at this time.
0 commit comments