1
- import React from 'react' ;
1
+ import React , { useMemo } from 'react' ;
2
2
import { View } from 'react-native' ;
3
3
import { useOnyx } from 'react-native-onyx' ;
4
4
import useIsAuthenticated from '@hooks/useIsAuthenticated' ;
5
5
import useLocalize from '@hooks/useLocalize' ;
6
6
import useStyleUtils from '@hooks/useStyleUtils' ;
7
7
import useThemeStyles from '@hooks/useThemeStyles' ;
8
8
import useWindowDimensions from '@hooks/useWindowDimensions' ;
9
+ import { getBrowser , isChromeIOS } from '@libs/Browser' ;
9
10
import Navigation from '@navigation/Navigation' ;
10
11
import toggleTestToolsModal from '@userActions/TestTool' ;
11
12
import CONST from '@src/CONST' ;
@@ -34,6 +35,17 @@ function TestToolsModal() {
34
35
const isAuthenticated = useIsAuthenticated ( ) ;
35
36
const route = getRouteBasedOnAuthStatus ( isAuthenticated , activeRoute ) ;
36
37
38
+ const shouldShowProfileTool = useMemo ( ( ) => {
39
+ const browser = getBrowser ( ) ;
40
+ const isSafariOrFirefox = browser === CONST . BROWSER . SAFARI || browser === CONST . BROWSER . FIREFOX ;
41
+
42
+ if ( isSafariOrFirefox || isChromeIOS ( ) ) {
43
+ return false ;
44
+ }
45
+
46
+ return true ;
47
+ } , [ ] ) ;
48
+
37
49
return (
38
50
< Modal
39
51
isVisible = { ! ! isTestToolsModalOpen }
@@ -47,7 +59,7 @@ function TestToolsModal() {
47
59
>
48
60
{ translate ( 'initialSettingsPage.troubleshoot.releaseOptions' ) }
49
61
</ Text >
50
- < ProfilingToolMenu />
62
+ { shouldShowProfileTool && < ProfilingToolMenu /> }
51
63
< ClientSideLoggingToolMenu />
52
64
{ ! ! shouldStoreLogs && (
53
65
< TestToolRow title = { translate ( 'initialSettingsPage.troubleshoot.debugConsole' ) } >
0 commit comments