api proxy working :)

This commit is contained in:
= 2024-12-06 03:25:50 +01:00
parent e53fc84ac3
commit bf73ed1698
2 changed files with 19 additions and 4 deletions

View file

@ -9,7 +9,7 @@ export default function ArticlesSection() {
const [error, setError] = useState<string | null>(null);
useEffect(() => {
fetch('/api/article')
fetch('/api/articles')
.then(response => response.json())
.then((data: ArticlePreview[]) => setArticlePreviews(data))
.catch(_ => setError('Failed to fetch articles'))