From bd142ddec3de273776e50e9ce232cec275f797fb Mon Sep 17 00:00:00 2001 From: Cedric Paje Date: Sun, 7 Nov 2021 10:32:40 +0100 Subject: [PATCH] [FIX] Home page The error occurred when trying to load more posts with an empty database --- pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.js b/pages/index.js index fccafd7..5df29b1 100644 --- a/pages/index.js +++ b/pages/index.js @@ -64,7 +64,7 @@ export default function Home(props) { - {!loading && !postsEnd && } + {posts.length === 0 ? ('Your application has no posts yet') : (!loading && !postsEnd && )}