"use client" import { FilePlus, FolderPlus, Loader2, Search } from "lucide-react" import SidebarFile from "./file" import SidebarFolder from "./folder" import { TFile, TFolder } from "./types" // Note: add renaming validation: // In general: must not contain / or \ or whitespace, not empty, no duplicates // Files: must contain dot // Folders: must not contain dot export default function Sidebar({ files, selectFile, }: { files: (TFile | TFolder)[] selectFile: (tab: TFile) => void }) { return (
Explorer
{files.length === 0 ? (
) : ( files.map((child) => child.type === "file" ? ( ) : ( ) ) )}
) }