File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ const DataSamplesPage = () => {
7575 < Button
7676 ref = { trainButtonRef }
7777 className = { tourElClassname . trainModelButton }
78- onClick = { trainModelFlowStart }
78+ onClick = { ( ) => trainModelFlowStart ( handleNavigateToModel ) }
7979 variant = { hasSufficientData ? "primary" : "secondary-disabled" }
8080 >
8181 < FormattedMessage id = { "menu.trainer.trainModelButton" } />
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ export interface Actions {
135135 recordingStarted ( ) : void ;
136136 recordingStopped ( ) : void ;
137137 newSession ( ) : void ;
138- trainModelFlowStart : ( ) => Promise < void > ;
138+ trainModelFlowStart : ( callback ?: ( ) => void ) => Promise < void > ;
139139 closeTrainModelDialogs : ( ) => void ;
140140 trainModel ( ) : Promise < boolean > ;
141141 setSettings ( update : Partial < Settings > ) : void ;
@@ -415,7 +415,7 @@ export const useStore = create<Store>()(
415415 } ) ;
416416 } ,
417417
418- async trainModelFlowStart ( ) {
418+ async trainModelFlowStart ( callback ?: ( ) => void ) {
419419 const {
420420 settings : { showPreTrainHelp } ,
421421 gestures,
@@ -431,6 +431,7 @@ export const useStore = create<Store>()(
431431 } ) ;
432432 } else {
433433 await trainModel ( ) ;
434+ callback ?.( ) ;
434435 }
435436 } ,
436437
You can’t perform that action at this time.
0 commit comments