File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -623,12 +623,22 @@ const Migration = () => {
623623 }
624624 } ) ;
625625 } else {
626- event . preventDefault ( ) ;
627- const url = `/projects/${ projectId } /migration/steps/4` ;
628- navigate ( url , { replace : true } ) ;
629626
630- await updateCurrentStepData ( selectedOrganisation . value , projectId ) ;
631- handleStepChange ( 3 ) ;
627+ const res = await updateCurrentStepData ( selectedOrganisation . value , projectId ) ;
628+ if ( res ?. status === 200 ) {
629+ setIsLoading ( false ) ;
630+ event . preventDefault ( ) ;
631+ handleStepChange ( 3 ) ;
632+ const url = `/projects/${ projectId } /migration/steps/4` ;
633+ navigate ( url , { replace : true } ) ;
634+ } else {
635+ setIsLoading ( false ) ;
636+ Notification ( {
637+ notificationContent : { text : res ?. data ?. error ?. message } ,
638+ type : 'error'
639+ } ) ;
640+ }
641+
632642 }
633643 } ;
634644
@@ -722,7 +732,7 @@ const Migration = () => {
722732 < div className = "steps-wrapper" >
723733 < HorizontalStepper
724734 ref = { stepperRef }
725- steps = { createStepper ( projectData ?? defaultMigrationResponse , handleClick ) }
735+ steps = { createStepper ( projectData ?? defaultMigrationResponse , handleStepChange ) }
726736 handleSaveCT = { saveRef ?. current ?. handleSaveContentType }
727737 changeDropdownState = { changeDropdownState }
728738 projectData = { projectData || defaultMigrationResponse }
You can’t perform that action at this time.
0 commit comments