import { useSearch } from "wouter"; import { ArticleList, FeedSidebar } from "../components"; import { usePaginatedArticles } from "../hooks/usePaginatedArticles"; export function UnreadArticles() { const search = useSearch(); const params = new URLSearchParams(search); const feedId = params.get("feed"); const { articles, hasNextPage, loading, loadingMore, loadMore, error } = usePaginatedArticles({ isReadView: false, feedId }); return (

Unread

{!loading && articles.length > 0 && (

{articles.length} {hasNextPage ? "+" : ""} article {articles.length !== 1 ? "s" : ""} to read

)}
{loading ? (

Loading unread articles...

) : error ? (
Error: {error.message}
) : ( )}
); }