sourcebot/packages/web/src/app/[domain]/connections/page.tsx
Michael Sukkarieh db6e5d4841
chore(web): Remove deprecated connection creation/edit UI (#515)
* remove connections settings page

* fix styling and remove additional components

* add changelog
2025-09-17 17:24:35 -07:00

35 lines
1 KiB
TypeScript

import { ConnectionList } from "./components/connectionList";
import { Header } from "../components/header";
import { getConnections, getOrgMembership } from "@/actions";
import { isServiceError } from "@/lib/utils";
import { notFound, ServiceErrorException } from "@/lib/serviceError";
import { OrgRole } from "@sourcebot/db";
export default async function ConnectionsPage(props: { params: Promise<{ domain: string }> }) {
const params = await props.params;
const {
domain
} = params;
const connections = await getConnections(domain);
if (isServiceError(connections)) {
throw new ServiceErrorException(connections);
}
const membership = await getOrgMembership(domain);
if (isServiceError(membership)) {
throw new ServiceErrorException(notFound());
}
return (
<div>
<Header>
<h1 className="text-3xl">Connections</h1>
</Header>
<ConnectionList
isDisabled={membership.role !== OrgRole.OWNER}
/>
</div>
);
}