mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix(onboarding): use narrowed createData.value in use-create-org
This commit is contained in:
@@ -36,7 +36,7 @@ export const useCreateOrg = () => {
|
|||||||
if (!createData?.success) {
|
if (!createData?.success) {
|
||||||
throw new Error(createData?.actionError?.message ?? "Failed to create organisation");
|
throw new Error(createData?.actionError?.message ?? "Failed to create organisation");
|
||||||
}
|
}
|
||||||
const org = result.data.value;
|
const org = createData.value;
|
||||||
if (!org) throw new Error("Failed to create organisation");
|
if (!org) throw new Error("Failed to create organisation");
|
||||||
await updateContext({
|
await updateContext({
|
||||||
flowData: { ...state?.context.flowData, org: { id: org.id, name: org.name } },
|
flowData: { ...state?.context.flowData, org: { id: org.id, name: org.name } },
|
||||||
|
|||||||
Reference in New Issue
Block a user