diff --git a/src/components/EmptyChat.tsx b/src/components/EmptyChat.tsx
index 8c6bdab..2a06d1d 100644
--- a/src/components/EmptyChat.tsx
+++ b/src/components/EmptyChat.tsx
@@ -4,6 +4,7 @@ import { useEffect, useState } from 'react';
import { File } from './ChatWindow';
import Link from 'next/link';
import WeatherWidget from './WeatherWidget';
+import NewsArticleWidget from './NewsArticleWidget';
const EmptyChat = ({
sendMessage,
@@ -52,6 +53,9 @@ const EmptyChat = ({
+
+
+
diff --git a/src/components/NewsArticleWidget.tsx b/src/components/NewsArticleWidget.tsx
new file mode 100644
index 0000000..eca6940
--- /dev/null
+++ b/src/components/NewsArticleWidget.tsx
@@ -0,0 +1,71 @@
+import { useEffect, useState } from 'react';
+
+interface Article {
+ title: string;
+ content: string;
+ url: string;
+ thumbnail: string;
+}
+
+const NewsArticleWidget = () => {
+ const [article, setArticle] = useState(null);
+ const [loading, setLoading] = useState(true);
+ const [error, setError] = useState(false);
+
+ useEffect(() => {
+ fetch('/api/discover?mode=preview')
+ .then((res) => res.json())
+ .then((data) => {
+ const articles = (data.blogs || []).filter((a: Article) => a.thumbnail);
+ setArticle(articles[Math.floor(Math.random() * articles.length)]);
+ setLoading(false);
+ })
+ .catch(() => {
+ setError(true);
+ setLoading(false);
+ });
+ }, []);
+
+ return (
+
+ );
+};
+
+export default NewsArticleWidget;