MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / fetchData

Function fetchData

client/src/component/Blog.jsx:66–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 };
65
66 const fetchData = async () => {
67 try {
68 let response = await fetch(`${VITE_SERVER_PORT}/api/blog/all-blog`);
69 let data = await response.json();
70 setBlogPosts(data.blogs);
71 console.log(data.blogs);
72 } catch (error) {
73 console.error(error);
74 }
75 };
76
77 const handlePlay = (id, title, excerpt) => {
78 const textToSpeak = `${title}. ${excerpt}`;

Callers 1

BlogPageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected