import { Separator } from "@/components/ui/separator"; import { getRepoInfoByName } from "@/actions"; import { PathHeader } from "@/app/[domain]/components/pathHeader"; import { getFolderContents } from "@/features/fileTree/api"; import { isServiceError } from "@/lib/utils"; import { PureTreePreviewPanel } from "./pureTreePreviewPanel"; interface TreePreviewPanelProps { path: string; repoName: string; revisionName?: string; } export const TreePreviewPanel = async ({ path, repoName, revisionName }: TreePreviewPanelProps) => { const [repoInfoResponse, folderContentsResponse] = await Promise.all([ getRepoInfoByName(repoName), getFolderContents({ repoName, revisionName: revisionName ?? 'HEAD', path, }) ]); if (isServiceError(folderContentsResponse) || isServiceError(repoInfoResponse)) { return