From 1bee8deece9fb6e9e4a4a66158b1ff73041082c7 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 8 Nov 2025 02:14:15 +0000 Subject: [PATCH] completionId: cgen-6118acc1263141cfaefbe408e8a186b6 cgen-6118acc1263141cfaefbe408e8a186b6 --- client/pages/Onboarding.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/client/pages/Onboarding.tsx b/client/pages/Onboarding.tsx index 61c316d1..8e93ee8b 100644 --- a/client/pages/Onboarding.tsx +++ b/client/pages/Onboarding.tsx @@ -349,6 +349,25 @@ export default function Onboarding() { ]), ); + // Create creator profile if they provided primary arm + const creatorProfilePromise = data.creatorProfile.primaryArm + ? fetch(`/api/creators`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + user_id: user.id, + username: payload.username, + bio: data.creatorProfile.bio || null, + avatar_url: null, // Can be added later in profile settings + experience_level: data.experience.level || "junior", + primary_arm: data.creatorProfile.primaryArm, + arm_affiliations: [data.creatorProfile.primaryArm], + skills: data.creatorProfile.skills || [], + is_discoverable: true, + }), + }) + : Promise.resolve(); + Promise.allSettled([ interests.length ? fetch(`/api/interests`, { @@ -358,6 +377,7 @@ export default function Onboarding() { }) : Promise.resolve(), aethexAchievementService.checkAndAwardOnboardingAchievement(user.id), + creatorProfilePromise, ]).catch(() => undefined); // Mark onboarding complete locally (UI fallback)