@@ -11,6 +11,7 @@ import Text from '@components/Text';
1111import TextLink from '@components/TextLink' ;
1212import { isAuthenticationError } from '@libs/actions/connections' ;
1313import { getAdminPoliciesConnectedToSageIntacct } from '@libs/actions/Policy/Policy' ;
14+ import getPlatform from '@libs/getPlatform' ;
1415import { translateLocal } from '@libs/Localize' ;
1516import { canUseTaxNetSuite } from '@libs/PolicyUtils' ;
1617import Navigation from '@navigation/Navigation' ;
@@ -39,6 +40,9 @@ import {
3940} from './netsuite/utils' ;
4041import type { AccountingIntegration } from './types' ;
4142
43+ const platform = getPlatform ( true ) ;
44+ const isMobile = [ CONST . PLATFORM . MOBILE_WEB , CONST . PLATFORM . IOS , CONST . PLATFORM . ANDROID ] . some ( ( value ) => value === platform ) ;
45+
4246function getAccountingIntegrationData (
4347 connectionName : PolicyConnectionName ,
4448 policyID : string ,
@@ -48,7 +52,6 @@ function getAccountingIntegrationData(
4852 integrationToDisconnect ?: ConnectionName ,
4953 shouldDisconnectIntegrationBeforeConnecting ?: boolean ,
5054 canUseNetSuiteUSATax ?: boolean ,
51- isSmallScreenWidth ?: boolean ,
5255) : AccountingIntegration | undefined {
5356 const qboConfig = policy ?. connections ?. quickbooksOnline ?. config ;
5457 const netsuiteConfig = policy ?. connections ?. netsuite ?. options ?. config ;
@@ -68,7 +71,7 @@ function getAccountingIntegrationData(
6871 if ( integrationToDisconnect ) {
6972 return ROUTES . POLICY_ACCOUNTING . getRoute ( policyID , connectionName , integrationToDisconnect , shouldDisconnectIntegrationBeforeConnecting ) ;
7073 }
71- if ( isSmallScreenWidth ) {
74+ if ( isMobile ) {
7275 return ROUTES . POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_SETUP_REQUIRED_DEVICE_MODAL . getRoute ( policyID ) ;
7376 }
7477 return ROUTES . POLICY_ACCOUNTING_QUICKBOOKS_DESKTOP_SETUP_MODAL . getRoute ( policyID ) ;
0 commit comments