| 1 | import { notFound } from "next/navigation"; |
| 2 | |
| 3 | import { OrganizationGeneral } |
| 4 | import { createServerClient } |
| 5 | |
| 6 | export default async function |
| 7 | params, |
| 8 | }: PageProps< |
| 9 | const { username: |
| 10 | const client = |
| 11 | const [profile, |
| 12 | client.GET("/api/organizations/{slug} |
| 13 | client.GET("/api/organizations |
| 14 | client.GET("/api/organizations/{slug}/settings |
| 15 | params: { path: { |
| 16 | }), |
| 17 | // ponytail: the first 100 only; an organization with more deletes the rest before it can go. |
| 18 | client.GET("/api/repositories/{username} |
| 19 | params: { path: { |
| 20 | }), |
| 21 | ]); |
| 22 | if (!profile.data |
| 23 | const role = |
| 24 | (org) => |
| 25 | )?.viewerRole; |
| 26 | |
| 27 | return ( |
| 28 | <OrganizationGeneral |
| 29 | slug={slug} |
| 30 | name={profile.data |
| 31 | isOwner={role === |
| 32 | settings={settings.data |
| 33 | repositories={(repositories. |
| 34 | (repository) => |
| 35 | )} |
| 36 | pinned={profile.data |
| 37 | /> |
| 38 | ); |
| 39 | } |