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