@@ -7,7 +7,7 @@ import type {PolicyConnectionSyncProgress} from '@src/types/onyx/Policy';
77import usePrevious from './usePrevious' ;
88
99function useGustoSyncResultsModal ( policyID : string , connectionSyncProgress : OnyxEntry < PolicyConnectionSyncProgress > , isFocused : boolean ) {
10- const { showModal } = useModal ( ) ;
10+ const modal = useModal ( ) ;
1111 const previousSyncProgress = usePrevious ( connectionSyncProgress ) ;
1212
1313 useEffect ( ( ) => {
@@ -17,15 +17,14 @@ function useGustoSyncResultsModal(policyID: string, connectionSyncProgress: Onyx
1717 connectionSyncProgress ?. stageInProgress === CONST . POLICY . CONNECTIONS . SYNC_STAGE_NAME . JOB_DONE &&
1818 ! ! syncResult ;
1919 const didTransitionToJobDone =
20- previousSyncProgress ?. connectionName === CONST . POLICY . CONNECTIONS . NAME . GUSTO &&
21- previousSyncProgress ?. stageInProgress !== CONST . POLICY . CONNECTIONS . SYNC_STAGE_NAME . JOB_DONE ;
20+ previousSyncProgress ?. connectionName === CONST . POLICY . CONNECTIONS . NAME . GUSTO && previousSyncProgress ?. stageInProgress !== CONST . POLICY . CONNECTIONS . SYNC_STAGE_NAME . JOB_DONE ;
2221 const didGustoSyncComplete = isFocused && isGustoSyncDoneWithResult && didTransitionToJobDone ;
2322
2423 if ( ! didGustoSyncComplete || ! syncResult ) {
2524 return ;
2625 }
2726
28- showModal ( {
27+ modal . showModal ( {
2928 component : GustoSyncResultsModal ,
3029 props : { result : syncResult } ,
3130 id : `gusto-sync-results-${ policyID } ` ,
@@ -39,7 +38,7 @@ function useGustoSyncResultsModal(policyID: string, connectionSyncProgress: Onyx
3938 policyID ,
4039 previousSyncProgress ?. connectionName ,
4140 previousSyncProgress ?. stageInProgress ,
42- showModal ,
41+ modal ,
4342 ] ) ;
4443}
4544
0 commit comments