Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
otobongfp committed Feb 24, 2024
1 parent 7065589 commit b8427cc
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/pages/overview/overviewTop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ const OverviewTop = () => {
const [marketCap, setMarketCap] = useState(null);

useEffect(() => {
axios.get(`${BASE_URL}supply`).then((res) => {
setBlockHeight(res.data.height);
setBurned(res.data.burned / 100000000);
setSupply(res.data.total / 100000000);
});
});
const fetchData = async () => {
try {
const res = await axios.get(`${BASE_URL}supply`);
setBlockHeight(res.data.height);
setBurned(res.data.burned / 100000000);
setSupply(res.data.total / 100000000);
} catch (error) {
console.error("Error fetching data:", error);
}
};

fetchData();
}, []);

useEffect(() => {
const fetchData = async () => {
Expand Down

0 comments on commit b8427cc

Please sign in to comment.