@@ -301,7 +301,7 @@ const AnimationsPage: FunctionComponent = () => {
301301 ] ;
302302
303303 // A function to create a kebab toggle for a specific row index
304- const kebabToggle = ( index ) => ( toggleRef : React . Ref < any > ) => (
304+ const kebabToggle = ( index : number ) => ( toggleRef : React . Ref < any > ) => (
305305 < MenuToggle
306306 ref = { toggleRef }
307307 variant = "plain"
@@ -542,18 +542,6 @@ const AnimationsPage: FunctionComponent = () => {
542542 [ ]
543543 ) ;
544544
545- const startNotifications = ( ) => {
546- setTimeout ( ( ) => {
547- addNotification ( ) ;
548- } , 1000 ) ;
549- setTimeout ( ( ) => {
550- addNotification ( ) ;
551- } , 5000 ) ;
552- setTimeout ( ( ) => {
553- addNotification ( ) ;
554- } , 9000 ) ;
555- } ;
556-
557545 const onNavSelect = (
558546 _event : FormEvent < HTMLInputElement > ,
559547 selectedItem : {
@@ -563,7 +551,6 @@ const AnimationsPage: FunctionComponent = () => {
563551 }
564552 ) => {
565553 setActiveItem ( selectedItem . itemId ) ;
566- setActiveGroup ( selectedItem . groupId as string | null ) ;
567554 } ;
568555
569556 const focusDrawer = ( _event : any ) => {
@@ -577,9 +564,23 @@ const AnimationsPage: FunctionComponent = () => {
577564 firstTabbableItem ?. focus ( ) ;
578565 } ;
579566
580- const closeStartTourModal = ( startTour = false ) => {
567+ const closeStartTourModal = ( notNow = false ) => {
581568 setShowStartTourModal ( false ) ;
582- startTour ? onStart ( ) : startNotifications ( ) ;
569+ if ( notNow ) {
570+ setNotifications ( ( prev ) => [
571+ {
572+ id : `new-notification-${ prev . length + 1 } ` ,
573+ title : 'Explore animations' ,
574+ message : 'When you’re ready to take a tour of PatternFly’s exciting, new animations, refresh this page.' ,
575+ variant : AlertVariant . info ,
576+ timeout : 8000 ,
577+ timeoutAnimation : 8000 ,
578+ isNew : true ,
579+ isRead : false
580+ } ,
581+ ...prev
582+ ] ) ;
583+ }
583584 } ;
584585
585586 return (
@@ -741,7 +742,15 @@ const AnimationsPage: FunctionComponent = () => {
741742 ) }
742743 </ PageSection >
743744 ) }
744- { showStartTourModal ? < AnimationsStartTourModal onClose = { closeStartTourModal } /> : null }
745+ { showStartTourModal ? (
746+ < AnimationsStartTourModal
747+ onClose = { closeStartTourModal }
748+ onStart = { ( ) => {
749+ setShowStartTourModal ( false ) ;
750+ onStart ( ) ;
751+ } }
752+ />
753+ ) : null }
745754 { showEndTourModal ? < AnimationsEndTourModal /> : null }
746755 </ Page >
747756 ) ;
0 commit comments