CreateOrganization
Standalone organisation creation form using the Customer API.
The <CreateOrganization> component renders a form for creating a new organisation. It calls POST /v1/organisations via the Customer API using the signed-in user's access token.
Installation
pnpm add @wocha/ui @wocha/reactOr scaffold with the CLI
npx @wocha/cli init --framework nextjsBasic usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
appearance | WochaAppearance | — | Visual customisation |
className | string | — | Additional class name |
onSuccess | (org: { id, name, slug }) => void | — | Called after successful creation |
onError | (error: Error) => void | — | Called when creation fails |
afterCreateUrl | string | — | Redirect URL after successful creation |
Theming
Framework notes
Requires apiUrl on WochaProvider or WochaSessionProvider. User must be signed in.
| Framework | Provider |
|---|---|
| React SPA | WochaProvider with apiUrl in config |
| Next.js | WochaSessionProvider with apiUrl prop |