@@ -468,7 +468,7 @@ const ExportSchemaLegacyBanner: React.FunctionComponent<{
468468 onClose : ( ) => void ;
469469 onLegacyShare : ( ) => void ;
470470 onSwitchToSchemaExport : ( ) => void ;
471- stopShowingLegacyBanner : ( ) => void ;
471+ stopShowingLegacyBanner : ( choice : 'legacy' | 'export' ) => void ;
472472} > = ( {
473473 isOpen,
474474 onClose,
@@ -478,11 +478,11 @@ const ExportSchemaLegacyBanner: React.FunctionComponent<{
478478} ) => {
479479 const [ dontShowAgainChecked , setDontShowAgainChecked ] = useState ( false ) ;
480480 const handleLegacyShare = useCallback ( ( ) => {
481- if ( dontShowAgainChecked ) stopShowingLegacyBanner ( ) ;
481+ if ( dontShowAgainChecked ) stopShowingLegacyBanner ( 'legacy' ) ;
482482 onLegacyShare ( ) ;
483483 } , [ onLegacyShare , dontShowAgainChecked , stopShowingLegacyBanner ] ) ;
484484 const handleSwitchToNew = useCallback ( ( ) => {
485- if ( dontShowAgainChecked ) stopShowingLegacyBanner ( ) ;
485+ if ( dontShowAgainChecked ) stopShowingLegacyBanner ( 'export' ) ;
486486 onSwitchToSchemaExport ( ) ;
487487 } , [ onSwitchToSchemaExport , dontShowAgainChecked , stopShowingLegacyBanner ] ) ;
488488 return (
@@ -541,6 +541,7 @@ export default connect(
541541 onClose : ( ) => dispatch ( { type : SchemaExportActions . closeLegacyBanner } ) ,
542542 onLegacyShare : ( ) => dispatch ( confirmedLegacySchemaShare ( ) ) ,
543543 onSwitchToSchemaExport : ( ) => dispatch ( switchToSchemaExport ( ) ) ,
544- stopShowingLegacyBanner : ( ) => dispatch ( stopShowingLegacyBanner ( ) ) ,
544+ stopShowingLegacyBanner : ( choice : 'legacy' | 'export' ) =>
545+ dispatch ( stopShowingLegacyBanner ( choice ) ) ,
545546 } )
546547) ( ExportSchemaLegacyBanner ) ;
0 commit comments