diff --git a/packages/web/src/app/[domain]/connections/[id]/page.tsx b/packages/web/src/app/[domain]/connections/[id]/page.tsx index 72962f7e..dfbb7b11 100644 --- a/packages/web/src/app/[domain]/connections/[id]/page.tsx +++ b/packages/web/src/app/[domain]/connections/[id]/page.tsx @@ -7,104 +7,61 @@ import { BreadcrumbPage, BreadcrumbSeparator, } from "@/components/ui/breadcrumb" -import { TabSwitcher } from "@/components/ui/tab-switcher" -import { Tabs, TabsContent } from "@/components/ui/tabs" import { ConnectionIcon } from "../components/connectionIcon" import { Header } from "../../components/header" -import { ConfigSetting } from "./components/configSetting" -import { DeleteConnectionSetting } from "./components/deleteConnectionSetting" -import { DisplayNameSetting } from "./components/displayNameSetting" import { RepoList } from "./components/repoList" import { getConnectionByDomain } from "@/data/connection" import { Overview } from "./components/overview" -import { getOrgMembership } from "@/actions" -import { isServiceError } from "@/lib/utils" -import { notFound } from "next/navigation" -import { OrgRole } from "@sourcebot/db" -import { CodeHostType } from "@/lib/utils" -import { env } from "@/env.mjs" interface ConnectionManagementPageProps { params: Promise<{ domain: string id: string }>, - searchParams: Promise<{ - tab: string - }> } export default async function ConnectionManagementPage(props: ConnectionManagementPageProps) { - const searchParams = await props.searchParams; const params = await props.params; const connection = await getConnectionByDomain(Number(params.id), params.domain); if (!connection) { return } - const membership = await getOrgMembership(params.domain); - if (isServiceError(membership)) { - return notFound(); - } - - const isOwner = membership.role === OrgRole.OWNER; - const isDisabled = !isOwner || env.CONFIG_PATH !== undefined; - const currentTab = searchParams.tab || "overview"; - return ( - - - - - - Connections - - - - {connection.name} - - - - - - {connection.name} - - - - - - Overview - + + + + + + + Connections + + + + {connection.name} + + + + + + {connection.name} + + + + + + Overview + + - - Linked Repositories - + + Linked Repositories + + + - - - - - - - + + ) }