diff --git a/front/src/pages/HomePage.tsx b/front/src/pages/HomePage.tsx index bbdadae..aefc3f4 100644 --- a/front/src/pages/HomePage.tsx +++ b/front/src/pages/HomePage.tsx @@ -33,12 +33,12 @@ function fallbackGenerateStories(announcements: UseFetchReturn) return fallbackStory(announcements.error, true) } - const stories = generateStories(announcements.data, announcements.refetch) - - if (stories.length === 0) { + if (announcements.data.length === 0) { return [{ url: '/static/empty.png' }] } + const stories = generateStories(announcements.data, announcements.refetch) + return stories } @@ -88,7 +88,7 @@ function HomePage() { />