From 48f6059bbd6b5fc2847e6fdc643a73227973dfca Mon Sep 17 00:00:00 2001 From: dm1sh Date: Wed, 16 Aug 2023 00:18:22 +0300 Subject: [PATCH] Fixed on more homepage error --- front/src/pages/HomePage.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() { />