File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
apps/dashboard/src/app/onboarding Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,11 @@ export default function OnboardingPage({
176176 } ) ;
177177
178178 const onSubmit : SubmitHandler < FormData > = async ( data ) => {
179- console . log ( data ) ;
179+ const account = await accountQuery . refetch ( ) ;
180+ if ( ! account . data ?. id ) {
181+ throw new Error ( "No account found" ) ;
182+ }
183+
180184 const res = await fetch (
181185 `${ THIRDWEB_ANALYTICS_API_HOST } /v1/preferences/account` ,
182186 {
@@ -185,7 +189,7 @@ export default function OnboardingPage({
185189 "Content-Type" : "application/json" ,
186190 } ,
187191 body : JSON . stringify ( {
188- accountId : accountQuery . data ? .id ,
192+ accountId : account . data . id ,
189193 userType : data . userType ,
190194 role : data . role ,
191195 industry : data . industry ,
@@ -516,8 +520,8 @@ export default function OnboardingPage({
516520 event . preventDefault ( ) ; // Prevent default behavior
517521 const newInterests = isChecked
518522 ? checkedInterests . filter (
519- ( key ) => key !== interest . key ,
520- )
523+ ( key ) => key !== interest . key ,
524+ )
521525 : [ ...checkedInterests , interest . key ] ;
522526 form . setValue ( "interests" , newInterests ) ;
523527 } }
You can’t perform that action at this time.
0 commit comments