From 3cc73e786a7cd277523419d9b1f3f991635b5c60 Mon Sep 17 00:00:00 2001 From: ishikabhoyar Date: Sun, 30 Mar 2025 01:18:15 +0530 Subject: [PATCH] Refactor Sidebar component by removing unused folder icon and cleaning up code --- Frontend/src/components/Sidebar.jsx | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/Frontend/src/components/Sidebar.jsx b/Frontend/src/components/Sidebar.jsx index 1f26a69..82b03b3 100644 --- a/Frontend/src/components/Sidebar.jsx +++ b/Frontend/src/components/Sidebar.jsx @@ -31,10 +31,10 @@ const Sidebar = ({ const renderExplorer = () => { const renderFileTree = (structure, path = "") => { if (!structure) return null; - + return Object.entries(structure).map(([name, item]) => { const currentPath = path ? `${path}/${name}` : name; - + if (item.type === "folder") { const isExpanded = expandedFolders[currentPath]; return ( @@ -75,21 +75,6 @@ const Sidebar = ({ )} - - - - - {name} {isExpanded && ( @@ -137,7 +122,7 @@ const Sidebar = ({ } }); }; - + return (
@@ -184,7 +169,6 @@ const Sidebar = ({
); }; - const getFileIcon = (fileName) => { const extension = fileName.split('.').pop().toLowerCase();