@@ -80,9 +80,10 @@ export function StoriesList({
8080 const hasCategories = categories . length > 0 ;
8181 const hasStories = stories . length > 0 ;
8282 const isPreview = isPreviewActive ( ) ;
83+ const totalStories = newsrooms . reduce ( ( total , newsroom ) => newsroom . stories_number + total , 0 ) ;
8384
8485 const [ highlightedStories , restStories ] = useMemo ( ( ) => {
85- if ( isPreview && stories . length < 3 ) {
86+ if ( isPreview && totalStories < 3 ) {
8687 if ( isCategoryList ) {
8788 const placeholders = PLACEHOLDER_STORIES
8889 // Do not show the "Write your first Prezly story" placeholder in this case.
@@ -123,7 +124,7 @@ export function StoriesList({
123124 }
124125
125126 return [ stories . slice ( 0 , 1 ) , stories . slice ( 1 ) ] ;
126- } , [ hasCategories , isCategoryList , stories , isPreview ] ) ;
127+ } , [ hasCategories , isCategoryList , stories , isPreview , totalStories ] ) ;
127128
128129 const getStoryCardSize = useStoryCardLayout ( isCategoryList ) ;
129130
@@ -209,6 +210,7 @@ export function StoriesList({
209210 description = { story . description }
210211 title = { story . title }
211212 hasStories = { hasStories }
213+ isCategoryPage = { isCategoryList }
212214 />
213215 ) ;
214216 }
@@ -263,6 +265,7 @@ export function StoriesList({
263265 description = { story . description }
264266 title = { story . title }
265267 hasStories = { hasStories }
268+ isCategoryPage = { isCategoryList }
266269 />
267270 ) ;
268271 }
0 commit comments