"use client" import { FilePlus, FolderPlus, Loader2, Search } from "lucide-react" import SidebarFile from "./file" import SidebarFolder from "./folder" import { TFile, TFolder, TTab } from "./types" export default function Sidebar({ files, selectFile, handleRename, }: { files: (TFile | TFolder)[] selectFile: (tab: TTab) => void handleRename: ( id: string, newName: string, oldName: string, type: "file" | "folder" ) => boolean }) { return (
Explorer
{files.length === 0 ? (
) : ( files.map((child) => child.type === "file" ? ( ) : ( ) ) )}
) }