Skip to content

Commit 07fb079

Browse files
committed
feat: link to backend api
1 parent 716ac90 commit 07fb079

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/WelcomeDashboard.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,15 @@ const WelcomeDashboard = () => {
4747
</div>
4848
);
4949
};
50+
// Add a quick fetch function inside your component
51+
const checkStatus = async () => {
52+
try {
53+
const response = await fetch('http://localhost:8000/');
54+
const data = await response.json();
55+
console.log("Lab Status:", data);
56+
} catch (error) {
57+
console.error("Lab offline");
58+
}
59+
};
5060

5161
export default WelcomeDashboard;

0 commit comments

Comments
 (0)