From 2c5b7da8165e3f8b90748e8ced1de0e3e8d52309 Mon Sep 17 00:00:00 2001 From: lazydancer Date: Sun, 22 Dec 2024 17:33:11 -0500 Subject: Initial --- frontend/src/Path.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/src/Path.js (limited to 'frontend/src/Path.js') diff --git a/frontend/src/Path.js b/frontend/src/Path.js new file mode 100644 index 0000000..f375743 --- /dev/null +++ b/frontend/src/Path.js @@ -0,0 +1,16 @@ +import React from 'react'; +import usePolling from './usePolling'; +import DataDisplay from './DataDisplay'; // Import the DataDisplay component + +const Path = () => { + const { data, error } = usePolling('http://localhost:8000/route', 1000); + + return ( +
+ {error &&

Error: {error}

} + {data ? :

Loading data...

} +
+ ); +}; + +export default Path; \ No newline at end of file -- cgit v1.3