diff --git a/src/components/ProfilingToolMenu/BaseProfilingToolMenu.tsx b/src/components/ProfilingToolMenu/BaseProfilingToolMenu.tsx index 96697bdb794e..12282bf64445 100644 --- a/src/components/ProfilingToolMenu/BaseProfilingToolMenu.tsx +++ b/src/components/ProfilingToolMenu/BaseProfilingToolMenu.tsx @@ -28,6 +28,8 @@ type BaseProfilingToolMenuProps = { pathToBeUsed: string; /** Path used to display location of saved file */ displayPath: string; + /** Whether to show the share button */ + showShareButton?: boolean; } & BaseProfilingToolMenuOnyxProps; function formatBytes(bytes: number, decimals = 2) { @@ -47,7 +49,7 @@ function formatBytes(bytes: number, decimals = 2) { // WARNING: When changing this name make sure that the "scripts/symbolicate-profile.ts" script is still working! const newFileName = `Profile_trace_for_${pkg.version}.cpuprofile`; -function BaseProfilingToolMenu({isProfilingInProgress = false, pathToBeUsed, displayPath}: BaseProfilingToolMenuProps) { +function BaseProfilingToolMenu({isProfilingInProgress = false, showShareButton = false, pathToBeUsed, displayPath}: BaseProfilingToolMenuProps) { const styles = useThemeStyles(); const [filePath, setFilePath] = useState(''); const [sharePath, setSharePath] = useState(''); @@ -158,7 +160,7 @@ function BaseProfilingToolMenu({isProfilingInProgress = false, pathToBeUsed, dis onToggle={onToggleProfiling} /> - {!!filePath && getPlatform() !== CONST.PLATFORM.WEB && ( + {!!filePath && showShareButton && ( <> {`path: ${displayPath}/${newFileName}`} diff --git a/src/components/ProfilingToolMenu/index.android.tsx b/src/components/ProfilingToolMenu/index.android.tsx index 7ca3cc24c9a1..33c7354f199e 100644 --- a/src/components/ProfilingToolMenu/index.android.tsx +++ b/src/components/ProfilingToolMenu/index.android.tsx @@ -8,6 +8,7 @@ function ProfilingToolMenu() { ); } diff --git a/src/components/ProfilingToolMenu/index.ios.tsx b/src/components/ProfilingToolMenu/index.ios.tsx index 45400b6a6959..03298eccf034 100644 --- a/src/components/ProfilingToolMenu/index.ios.tsx +++ b/src/components/ProfilingToolMenu/index.ios.tsx @@ -12,6 +12,7 @@ function ProfilingToolMenu() { ); }