diff --git a/ui/components/NewsPage.tsx b/ui/components/NewsPage.tsx index ea2543b..5e72bf0 100644 --- a/ui/components/NewsPage.tsx +++ b/ui/components/NewsPage.tsx @@ -40,6 +40,49 @@ const NewsPage = () => { fetchNews(); }, []); + const renderContent = () => { + if (loading) { + return ( +
Loading news...
+Failed to load news.
+{error}
+No news available.
+ ); + } + + return ( +{item.summary}
+Loading news...
-Failed to load news.
-{error}
-No news available.
- ) : ( - news.map(item => ( -{item.summary}
-