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

Error: {error}

} + {data ? :

Loading data...

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