File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ const OnboardingForm: React.FC = () => {
218218 const [ formValues , setFormValues ] = useState < FormValues > ( { } ) ;
219219 const [ showGenderDefs , setShowGenderDefs ] = useState ( false ) ;
220220 const [ sliderValue , setSliderValue ] = useState ( 0 ) ;
221+ const [ isSubmitting , setIsSubmitting ] = useState ( false ) ;
221222
222223 const featureNames = [ 'connections' ] ;
223224 const [ allFeatures , _setAllFeatures ] = useState ( ( ) =>
@@ -256,6 +257,7 @@ const OnboardingForm: React.FC = () => {
256257 const currentQuestion = visibleQuestions [ step ] ;
257258
258259 const onSubmit : SubmitHandler < FormValues > = async ( ) => {
260+ setIsSubmitting ( true ) ;
259261 setError ( '' ) ;
260262 const allValues = { ...formValues , ...getValues ( ) } ;
261263 console . log ( JSON . stringify ( allValues , null , 2 ) ) ;
@@ -680,7 +682,7 @@ const OnboardingForm: React.FC = () => {
680682 type = "submit"
681683 className = "rounded-full px-6 py-2 font-semibold bg-red-700 text-white hover:bg-red-800 transition-colors"
682684 >
683- Submit
685+ { isSubmitting ? 'Saving...' : ' Submit' }
684686 </ button >
685687 ) }
686688 </ div >
You can’t perform that action at this time.
0 commit comments