generated from lucien/actix-react-template
api proxy working :)
This commit is contained in:
parent
e53fc84ac3
commit
bf73ed1698
2 changed files with 19 additions and 4 deletions
|
@ -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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue