From e3bcbb47107df9c47e8df5bdfc6b09ba58fd2ae7 Mon Sep 17 00:00:00 2001 From: highperfocused Date: Wed, 4 Mar 2026 19:39:11 +0100 Subject: [PATCH] feat: integrate following hook for improved loading and error handling in FollowingPage --- src/pages/FollowingPage.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/FollowingPage.tsx b/src/pages/FollowingPage.tsx index 49482b7..94e5ae1 100644 --- a/src/pages/FollowingPage.tsx +++ b/src/pages/FollowingPage.tsx @@ -1,6 +1,7 @@ import { useSeoMeta } from '@unhead/react'; import { useCurrentUser } from '@/hooks/useCurrentUser'; import { useFollowingBlogPosts } from '@/hooks/useFollowingBlogPosts'; +import { useFollowing } from '@/hooks/useFollowing'; import { ArticlePreview } from '@/components/ArticlePreview'; import { Card, CardContent } from '@/components/ui/card'; import { Skeleton } from '@/components/ui/skeleton'; @@ -10,7 +11,11 @@ import { LoginArea } from '@/components/auth/LoginArea'; export default function FollowingPage() { const { user } = useCurrentUser(); - const { data: posts = [], isLoading, isError } = useFollowingBlogPosts(); + const { isLoading: isLoadingFollowing, isError: isFollowingError } = useFollowing(); + const { data: posts = [], isLoading: isLoadingPosts, isError: isPostsError } = useFollowingBlogPosts(); + + const isLoading = isLoadingFollowing || isLoadingPosts; + const isError = isFollowingError || isPostsError; useSeoMeta({ title: 'Following - zelo.news',