From 4219570d80f9094a29fdd9aecac2c61a6289a740 Mon Sep 17 00:00:00 2001 From: Atharva Ombase <94031822+atharvaombase@users.noreply.github.com> Date: Tue, 15 Apr 2025 04:14:00 +0530 Subject: [PATCH] Feat:Added file table on the Dashboard --- Frontend/src/pages/UserPages/Dashboard.jsx | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Frontend/src/pages/UserPages/Dashboard.jsx b/Frontend/src/pages/UserPages/Dashboard.jsx index 887f332..d866320 100644 --- a/Frontend/src/pages/UserPages/Dashboard.jsx +++ b/Frontend/src/pages/UserPages/Dashboard.jsx @@ -1,17 +1,27 @@ import React from "react"; import Sidebar from "../../components/Sidebar"; +import FileList from "../../components/FileList"; const Dashboard = () => { + const [files, setFiles] = React.useState([]); + + React.useEffect(() => { + const fetchData = async () => { + const response = await fetch( + "http://192.168.29.61:8080/api/hdfs/listFiles?hdfsPath=/" + ); + const data = await response.json(); + setFiles(data); + }; + fetchData(); + }, []); + return ( <>
-

Dashboard

-

- This is your custom dashboard body. Place your widgets, charts, - stats, or other components here. -

+