fix(onboarding): use narrowed createData.value in use-create-org

This commit is contained in:
Théo LAGACHE
2026-06-19 10:42:21 +02:00
parent 1fc04d3b0b
commit 7b097c95c8
@@ -36,7 +36,7 @@ export const useCreateOrg = () => {
if (!createData?.success) {
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");
await updateContext({
flowData: { ...state?.context.flowData, org: { id: org.id, name: org.name } },