2025-02-04 20:04:05 +00:00
|
|
|
import { ConnectionList } from "./components/connectionList";
|
2025-02-10 22:31:38 +00:00
|
|
|
import { Header } from "../components/header";
|
2025-02-04 20:04:05 +00:00
|
|
|
import { NewConnectionCard } from "./components/newConnectionCard";
|
2025-02-12 21:05:44 +00:00
|
|
|
import NotFoundPage from "@/app/not-found";
|
|
|
|
|
import { getConnections } from "@/actions";
|
|
|
|
|
import { isServiceError } from "@/lib/utils";
|
2025-02-04 20:04:05 +00:00
|
|
|
|
2025-02-12 21:05:44 +00:00
|
|
|
export default async function ConnectionsPage({ params: { domain } }: { params: { domain: string } }) {
|
|
|
|
|
const connections = await getConnections(domain);
|
|
|
|
|
if (isServiceError(connections)) {
|
|
|
|
|
return <NotFoundPage />;
|
2025-02-04 20:04:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<Header>
|
|
|
|
|
<h1 className="text-3xl">Connections</h1>
|
|
|
|
|
</Header>
|
|
|
|
|
<div className="flex flex-col md:flex-row gap-4">
|
|
|
|
|
<ConnectionList
|
|
|
|
|
connections={connections}
|
|
|
|
|
className="md:w-3/4"
|
|
|
|
|
/>
|
|
|
|
|
<NewConnectionCard
|
|
|
|
|
className="md:w-1/4"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|