Files
Ivan VasilovandWen Bo Xie 977b867bef fix: During project claim, disable the orgs for choosing who can't add another projects (#39398)
* If the auth id has already been used for approving the same org, ignore the error.

* Accidentally committed the wrong code while testing.

* Disable the choose org button if the org can't add more free projects.

* Hide the tooltip if the condition is met.

---------

Co-authored-by: Wen Bo Xie <wenbox323@gmail.com>
2025-10-25 14:17:19 +02:00

24 lines
885 B
TypeScript

import { OrganizationSelector } from 'components/ui/org-selector'
import { ProjectClaimLayout } from './layout'
export interface ProjectClaimChooseOrgProps {
onChoose: (orgSlug: string) => void
}
const MAX_ORGS_TO_SHOW = 5
export function ProjectClaimChooseOrg({ onChoose }: ProjectClaimChooseOrgProps) {
return (
<ProjectClaimLayout title="Claim a project">
<div className="mx-auto gap-y-4 py-6 flex flex-col">
<p className="text-sm text-foreground-light">
This is the first step in claiming your Supabase project. Once you're finished, the
project will be transferred to Supabase organization.
</p>
<p className="text-sm text-foreground-light">Please select an organization to continue.</p>
<OrganizationSelector onSelect={onChoose} maxOrgsToShow={MAX_ORGS_TO_SHOW} />
</div>
</ProjectClaimLayout>
)
}