- {Object.keys(posts).length === 0 && (
+ {(Object.keys(posts).length === 0 || Object.keys(currentPosts).length === 0) && (
No post matches your filter
@@ -122,16 +169,23 @@ export default function BlogIndexPage() {
)}
{Object.keys(posts).length > 0 && isClient && (
- {posts.map((post, index) => (
+ {currentPosts.map((post, index) => (
))}
)}
- {Object.keys(posts).length > 0 && !isClient && (
+ {Object.keys(currentPosts).length > 0 && !isClient && (
)}
+ {/* Pagination component */}
+