Skip to content

Commit

Permalink
chore: extract shared code into functions
Browse files Browse the repository at this point in the history
  • Loading branch information
A9-dev committed Sep 3, 2024
1 parent 115ebb9 commit 620adff
Show file tree
Hide file tree
Showing 4 changed files with 455 additions and 815 deletions.
6 changes: 6 additions & 0 deletions packages/cahn_demo/client/src/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ const Home = () => {

useEffect(() => {
axios.get("http://localhost:3001/all_devices_data").then((res) => {
if (res.data.length === 0) {
console.log("No data found");
return;
}
console.log("res.data :>> ", res.data);
setData(res.data);
console.log("res.data[0] :>> ", res.data[0]);
setSelectedDevice(res.data[0]);
setIsLoading(false);
});
Expand Down
Loading

0 comments on commit 620adff

Please sign in to comment.