@@ -91,9 +91,18 @@ export const HelloMilestoneDemo = () => {
9191 } , 100 ) ;
9292 }
9393 } else {
94- // Demo completed
95- setIsScrollingToNext ( false ) ;
96- setCurrentHighlightedStep ( null ) ;
94+ // Demo completed - scroll to completion section
95+ setTimeout ( ( ) => {
96+ const completionSection = document . querySelector ( '#demo-completion-section' ) ;
97+ if ( completionSection ) {
98+ completionSection . scrollIntoView ( {
99+ behavior : 'smooth' ,
100+ block : 'center' ,
101+ } ) ;
102+ }
103+ setIsScrollingToNext ( false ) ;
104+ setCurrentHighlightedStep ( null ) ;
105+ } , 1000 ) ;
97106 }
98107 } ;
99108
@@ -584,23 +593,15 @@ export const HelloMilestoneDemo = () => {
584593 setEscrowData ( result . escrow ) ;
585594 setCurrentStep ( 5 ) ;
586595
596+ // Scroll to completion section
597+ setTimeout ( ( ) => {
598+ scrollToNextStep ( 'release' ) ;
599+ } , 1000 ) ;
600+
587601 // Demo completed - show celebration animation
588602 setTimeout ( ( ) => {
589603 setShowConfetti ( true ) ;
590- setIsScrollingToNext ( false ) ;
591- setCurrentHighlightedStep ( null ) ;
592-
593- // Scroll to top to show completion
594- setTimeout ( ( ) => {
595- const demoContainer = document . querySelector ( '.demo-container' ) ;
596- if ( demoContainer ) {
597- demoContainer . scrollIntoView ( {
598- behavior : 'smooth' ,
599- block : 'start' ,
600- } ) ;
601- }
602- } , 500 ) ;
603- } , 1000 ) ;
604+ } , 2000 ) ;
604605 } catch ( error ) {
605606 const txHash = `release_${ Date . now ( ) } _${ Math . random ( ) . toString ( 36 ) . substr ( 2 , 9 ) } ` ;
606607 addTransaction ( {
@@ -806,7 +807,10 @@ export const HelloMilestoneDemo = () => {
806807
807808 { /* Success Message */ }
808809 { currentStep === 5 && (
809- < div className = 'mb-8 p-6 bg-success-500/20 border border-success-400/30 rounded-lg text-center' >
810+ < div
811+ id = 'demo-completion-section'
812+ className = 'mb-8 p-6 bg-success-500/20 border border-success-400/30 rounded-lg text-center'
813+ >
810814 < div className = 'flex justify-center mb-4' >
811815 < Image
812816 src = '/images/logo/logoicon.png'
0 commit comments