Skip to content

Commit

Permalink
Update src/App.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Volodymyr Soltys <64750958+volodymyr-soltys97@users.noreply.github.com>
  • Loading branch information
mykyta01 and volodymyr-soltys97 authored Aug 25, 2024
1 parent 6583e47 commit 28da1a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ export const App: React.FC = () => {
setIsLoading(true);

getPosts(selectedUser.id)
.then(loadedPosts => {
setPosts(loadedPosts);
})
.then(setPosts)
.catch(() => {
setIsErrorOnPostsLoad(true);
})
Expand Down

0 comments on commit 28da1a0

Please sign in to comment.