Skip to content

Commit

Permalink
fix: remove news state dependency from useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
oahnh committed May 26, 2024
1 parent 444da2b commit 4f2d01b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/news/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function App() {
setNews(fetchedNews);
};
getNews();
}, [news]);
}, []);
return (
<div className="bg-ivory h-full">
<NavBar />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ function HomeNewsFeed() {
setNews(topThreeNews);
};
getNews();
}, [news]);
}, []);

return (
<div
className="w-full flex flex-row px-2.5 py-20 web:px-56 web:py-28 gap-40
justify-center items-center justify-start"
justify-center items-center"
>
{isWebDevice && (
<img
Expand Down

0 comments on commit 4f2d01b

Please sign in to comment.