"use client" import { cn, type CodeHostType, getCodeHostIcon } from "@/lib/utils" import placeholderLogo from "@/public/placeholder_avatar.png" import { BlocksIcon, LockIcon } from "lucide-react" import Image from "next/image" import Link from "next/link" import { useMemo } from "react" import { OrgRole } from "@sourcebot/db" interface NewConnectionCardProps { className?: string role: OrgRole configPathProvided: boolean } export const NewConnectionCard = ({ className, role, configPathProvided }: NewConnectionCardProps) => { const isOwner = role === OrgRole.OWNER const isDisabled = !isOwner || configPathProvided return (
Create a connection to import repos from a code host.
{configPathProvided ? "Connections are managed through the configuration file." : "Only organization owners can manage connections."}
)}{title}
{subtitle}