Skip to content

Commit

Permalink
Refactor API response handling in App component
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-vahn committed Apr 26, 2024
1 parent adb55d8 commit c2ab702
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ function App() {
})

.then((response) => {
console.log(response.data.accounts[0]);
const { account, balance } = response.data;
setAccount(account);
setBalance(balance);
setAccount(response.data.account);
setBalance(response.data.balance);
});
};

Expand Down

0 comments on commit c2ab702

Please sign in to comment.