From 90647ddeac53f5d77db7ca6b2c94eabd721fa6df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= <lucien@expensify.com>
Date: Thu, 11 Apr 2024 15:18:34 +0200
Subject: [PATCH 1/6] comment the QR code download button until it can be fixed

---
 src/pages/ShareCodePage.tsx                       | 10 +++++++---
 src/pages/workspace/WorkspaceProfileSharePage.tsx | 12 ++++++++----
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx
index 4f1bac01b556..65af93c28fb4 100644
--- a/src/pages/ShareCodePage.tsx
+++ b/src/pages/ShareCodePage.tsx
@@ -76,6 +76,10 @@ function ShareCodePage({report}: ShareCodePageProps) {
             />
             <ScrollView style={[themeStyles.flex1, themeStyles.pt3]}>
                 <View style={[themeStyles.workspaceSectionMobile, themeStyles.ph5]}>
+                    {/* 
+                    This is a temporary measure because right now it's broken because of the Fabric update.
+                    We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
+                    
                     <QRShareWithDownload
                         ref={qrCodeRef}
                         url={url}
@@ -84,7 +88,7 @@ function ShareCodePage({report}: ShareCodePageProps) {
                         logo={isReport ? expensifyLogo : (UserUtils.getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}
                         logoRatio={isReport ? CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO : CONST.QR.DEFAULT_LOGO_SIZE_RATIO}
                         logoMarginRatio={isReport ? CONST.QR.EXPENSIFY_LOGO_MARGIN_RATIO : CONST.QR.DEFAULT_LOGO_MARGIN_RATIO}
-                    />
+                    /> */}
                 </View>
 
                 <View style={themeStyles.mt9}>
@@ -98,7 +102,7 @@ function ShareCodePage({report}: ShareCodePageProps) {
                         shouldLimitWidth={false}
                     />
 
-                    {isNative && (
+                    {/* {isNative && (
                         <MenuItem
                             isAnonymousAction
                             title={translate('common.download')}
@@ -106,7 +110,7 @@ function ShareCodePage({report}: ShareCodePageProps) {
                             // eslint-disable-next-line @typescript-eslint/no-misused-promises
                             onPress={() => qrCodeRef.current?.download?.()}
                         />
-                    )}
+                    )} */}
 
                     <MenuItem
                         title={translate(`referralProgram.${CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE}.buttonText1`)}
diff --git a/src/pages/workspace/WorkspaceProfileSharePage.tsx b/src/pages/workspace/WorkspaceProfileSharePage.tsx
index 340c63c19ea7..5f9f9ec49913 100644
--- a/src/pages/workspace/WorkspaceProfileSharePage.tsx
+++ b/src/pages/workspace/WorkspaceProfileSharePage.tsx
@@ -51,14 +51,18 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
             <ScrollView style={[themeStyles.flex1, themeStyles.pt2]}>
                 <View style={[themeStyles.flex1, isSmallScreenWidth ? themeStyles.workspaceSectionMobile : themeStyles.workspaceSection]}>
                     <View style={[themeStyles.workspaceSectionMobile, themeStyles.ph9]}>
-                        <QRShareWithDownload
+                        {/* 
+                            This is a temporary measure because right now it's broken because of the Fabric update.
+                            We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
+
+                            <QRShareWithDownload
                             ref={qrCodeRef}
                             url={url}
                             title={policyName}
                             logo={(policy?.avatar ? policy.avatar : expensifyLogo) as ImageSourcePropType}
                             logoRatio={CONST.QR.DEFAULT_LOGO_SIZE_RATIO}
                             logoMarginRatio={CONST.QR.DEFAULT_LOGO_MARGIN_RATIO}
-                        />
+                        /> */}
                     </View>
 
                     <View style={[themeStyles.mt3, themeStyles.ph4]}>
@@ -72,7 +76,7 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
                             shouldLimitWidth={false}
                             wrapperStyle={themeStyles.sectionMenuItemTopDescription}
                         />
-                        {shouldAllowDownloadQRCode && (
+                        {/* {shouldAllowDownloadQRCode && (
                             <MenuItem
                                 isAnonymousAction
                                 title={translate('common.download')}
@@ -80,7 +84,7 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
                                 onPress={() => qrCodeRef.current?.download?.()}
                                 wrapperStyle={themeStyles.sectionMenuItemTopDescription}
                             />
-                        )}
+                        )} */}
                     </View>
                 </View>
             </ScrollView>

From f8deb981da2798f05b8d848d6d122a16df78380a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= <lucien@expensify.com>
Date: Thu, 11 Apr 2024 15:35:00 +0200
Subject: [PATCH 2/6] add GH to comment to add back the download button as soon
 as it's possible

---
 src/pages/ShareCodePage.tsx                       | 3 ++-
 src/pages/workspace/WorkspaceProfileSharePage.tsx | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx
index 65af93c28fb4..bb3faa94165b 100644
--- a/src/pages/ShareCodePage.tsx
+++ b/src/pages/ShareCodePage.tsx
@@ -79,7 +79,8 @@ function ShareCodePage({report}: ShareCodePageProps) {
                     {/* 
                     This is a temporary measure because right now it's broken because of the Fabric update.
                     We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
-                    
+                    Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
+
                     <QRShareWithDownload
                         ref={qrCodeRef}
                         url={url}
diff --git a/src/pages/workspace/WorkspaceProfileSharePage.tsx b/src/pages/workspace/WorkspaceProfileSharePage.tsx
index 5f9f9ec49913..bb50dab0e6bf 100644
--- a/src/pages/workspace/WorkspaceProfileSharePage.tsx
+++ b/src/pages/workspace/WorkspaceProfileSharePage.tsx
@@ -54,6 +54,7 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
                         {/* 
                             This is a temporary measure because right now it's broken because of the Fabric update.
                             We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
+                            Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
 
                             <QRShareWithDownload
                             ref={qrCodeRef}

From ff3e484eaa50ff5fb5ec2767fde3dc80e3af8ed3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= <lucien@expensify.com>
Date: Thu, 11 Apr 2024 15:48:51 +0200
Subject: [PATCH 3/6] fix lint

---
 src/pages/ShareCodePage.tsx                   | 56 ++++++++++---------
 .../workspace/WorkspaceProfileSharePage.tsx   | 22 ++++----
 2 files changed, 41 insertions(+), 37 deletions(-)

diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx
index bb3faa94165b..77dc23c0def8 100644
--- a/src/pages/ShareCodePage.tsx
+++ b/src/pages/ShareCodePage.tsx
@@ -1,14 +1,14 @@
-import React, {useMemo, useRef} from 'react';
+import React from 'react';
 import {View} from 'react-native';
-import type {ImageSourcePropType} from 'react-native';
+// import type {ImageSourcePropType} from 'react-native';
 import type {OnyxEntry} from 'react-native-onyx';
-import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png';
+// import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png';
 import ContextMenuItem from '@components/ContextMenuItem';
 import HeaderWithBackButton from '@components/HeaderWithBackButton';
 import * as Expensicons from '@components/Icon/Expensicons';
 import MenuItem from '@components/MenuItem';
-import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
-import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
+// import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
+// import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
 import ScreenWrapper from '@components/ScreenWrapper';
 import ScrollView from '@components/ScrollView';
 import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
@@ -16,11 +16,11 @@ import useEnvironment from '@hooks/useEnvironment';
 import useLocalize from '@hooks/useLocalize';
 import useThemeStyles from '@hooks/useThemeStyles';
 import Clipboard from '@libs/Clipboard';
-import getPlatform from '@libs/getPlatform';
+// import getPlatform from '@libs/getPlatform';
 import Navigation from '@libs/Navigation/Navigation';
-import * as ReportUtils from '@libs/ReportUtils';
+// import * as ReportUtils from '@libs/ReportUtils';
 import * as Url from '@libs/Url';
-import * as UserUtils from '@libs/UserUtils';
+// import * as UserUtils from '@libs/UserUtils';
 import CONST from '@src/CONST';
 import ROUTES from '@src/ROUTES';
 import type {Report} from '@src/types/onyx';
@@ -36,36 +36,36 @@ function ShareCodePage({report}: ShareCodePageProps) {
     const themeStyles = useThemeStyles();
     const {translate} = useLocalize();
     const {environmentURL} = useEnvironment();
-    const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
+    // const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
     const currentUserPersonalDetails = useCurrentUserPersonalDetails();
 
     const isReport = !!report?.reportID;
 
-    const subtitle = useMemo(() => {
-        if (isReport) {
-            if (ReportUtils.isExpenseReport(report)) {
-                return ReportUtils.getPolicyName(report);
-            }
-            if (ReportUtils.isMoneyRequestReport(report)) {
-                // generate subtitle from participants
-                return ReportUtils.getVisibleMemberIDs(report)
-                    .map((accountID) => ReportUtils.getDisplayNameForParticipant(accountID))
-                    .join(' & ');
-            }
+    // const subtitle = useMemo(() => {
+    //     if (isReport) {
+    //         if (ReportUtils.isExpenseReport(report)) {
+    //             return ReportUtils.getPolicyName(report);
+    //         }
+    //         if (ReportUtils.isMoneyRequestReport(report)) {
+    //             // generate subtitle from participants
+    //             return ReportUtils.getVisibleMemberIDs(report)
+    //                 .map((accountID) => ReportUtils.getDisplayNameForParticipant(accountID))
+    //                 .join(' & ');
+    //         }
 
-            return ReportUtils.getParentNavigationSubtitle(report).workspaceName ?? ReportUtils.getChatRoomSubtitle(report);
-        }
+    //         return ReportUtils.getParentNavigationSubtitle(report).workspaceName ?? ReportUtils.getChatRoomSubtitle(report);
+    //     }
 
-        return currentUserPersonalDetails.login;
-    }, [report, currentUserPersonalDetails, isReport]);
+    //     return currentUserPersonalDetails.login;
+    // }, [report, currentUserPersonalDetails, isReport]);
 
-    const title = isReport ? ReportUtils.getReportName(report) : currentUserPersonalDetails.displayName ?? '';
+    // const title = isReport ? ReportUtils.getReportName(report) : currentUserPersonalDetails.displayName ?? '';
     const urlWithTrailingSlash = Url.addTrailingForwardSlash(environmentURL);
     const url = isReport
         ? `${urlWithTrailingSlash}${ROUTES.REPORT_WITH_ID.getRoute(report.reportID)}`
         : `${urlWithTrailingSlash}${ROUTES.PROFILE.getRoute(currentUserPersonalDetails.accountID ?? '')}`;
-    const platform = getPlatform();
-    const isNative = platform === CONST.PLATFORM.IOS || platform === CONST.PLATFORM.ANDROID;
+    // const platform = getPlatform();
+    // const isNative = platform === CONST.PLATFORM.IOS || platform === CONST.PLATFORM.ANDROID;
 
     return (
         <ScreenWrapper testID={ShareCodePage.displayName}>
@@ -79,6 +79,8 @@ function ShareCodePage({report}: ShareCodePageProps) {
                     {/* 
                     This is a temporary measure because right now it's broken because of the Fabric update.
                     We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
+                    That's why you see parts of the code commented.
+                    
                     Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
 
                     <QRShareWithDownload
diff --git a/src/pages/workspace/WorkspaceProfileSharePage.tsx b/src/pages/workspace/WorkspaceProfileSharePage.tsx
index bb50dab0e6bf..5d7cc9b3e58d 100644
--- a/src/pages/workspace/WorkspaceProfileSharePage.tsx
+++ b/src/pages/workspace/WorkspaceProfileSharePage.tsx
@@ -1,14 +1,14 @@
-import React, {useRef} from 'react';
+import React from 'react';
 import {View} from 'react-native';
-import type {ImageSourcePropType} from 'react-native';
-import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png';
+// import type {ImageSourcePropType} from 'react-native';
+// import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png';
 import ContextMenuItem from '@components/ContextMenuItem';
 import HeaderWithBackButton from '@components/HeaderWithBackButton';
 import * as Expensicons from '@components/Icon/Expensicons';
-import MenuItem from '@components/MenuItem';
+// import MenuItem from '@components/MenuItem';
 import {useSession} from '@components/OnyxProvider';
-import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
-import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
+// import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
+// import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
 import ScreenWrapper from '@components/ScreenWrapper';
 import ScrollView from '@components/ScrollView';
 import useEnvironment from '@hooks/useEnvironment';
@@ -17,9 +17,9 @@ import useThemeStyles from '@hooks/useThemeStyles';
 import useWindowDimensions from '@hooks/useWindowDimensions';
 import Clipboard from '@libs/Clipboard';
 import Navigation from '@libs/Navigation/Navigation';
-import shouldAllowDownloadQRCode from '@libs/shouldAllowDownloadQRCode';
+// import shouldAllowDownloadQRCode from '@libs/shouldAllowDownloadQRCode';
 import * as Url from '@libs/Url';
-import CONST from '@src/CONST';
+// import CONST from '@src/CONST';
 import ROUTES from '@src/ROUTES';
 import withPolicy from './withPolicy';
 import type {WithPolicyProps} from './withPolicy';
@@ -28,11 +28,11 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
     const themeStyles = useThemeStyles();
     const {translate} = useLocalize();
     const {environmentURL} = useEnvironment();
-    const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
+    // const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
     const {isSmallScreenWidth} = useWindowDimensions();
     const session = useSession();
 
-    const policyName = policy?.name ?? '';
+    // const policyName = policy?.name ?? '';
     const id = policy?.id ?? '';
     const adminEmail = session?.email ?? '';
     const urlWithTrailingSlash = Url.addTrailingForwardSlash(environmentURL);
@@ -54,6 +54,8 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
                         {/* 
                             This is a temporary measure because right now it's broken because of the Fabric update.
                             We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
+                            That's why you see parts of the code commented.
+                            
                             Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
 
                             <QRShareWithDownload

From dbd8a9c0addd96ec0d91d7a6e0b5489db6876406 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= <lucien@expensify.com>
Date: Thu, 11 Apr 2024 15:58:18 +0200
Subject: [PATCH 4/6] delete unused code

---
 src/pages/ShareCodePage.tsx                   | 30 -------------------
 .../workspace/WorkspaceProfileSharePage.tsx   | 10 -------
 2 files changed, 40 deletions(-)

diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx
index 77dc23c0def8..d0d832b2b615 100644
--- a/src/pages/ShareCodePage.tsx
+++ b/src/pages/ShareCodePage.tsx
@@ -1,14 +1,10 @@
 import React from 'react';
 import {View} from 'react-native';
-// import type {ImageSourcePropType} from 'react-native';
 import type {OnyxEntry} from 'react-native-onyx';
-// import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png';
 import ContextMenuItem from '@components/ContextMenuItem';
 import HeaderWithBackButton from '@components/HeaderWithBackButton';
 import * as Expensicons from '@components/Icon/Expensicons';
 import MenuItem from '@components/MenuItem';
-// import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
-// import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
 import ScreenWrapper from '@components/ScreenWrapper';
 import ScrollView from '@components/ScrollView';
 import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
@@ -16,11 +12,8 @@ import useEnvironment from '@hooks/useEnvironment';
 import useLocalize from '@hooks/useLocalize';
 import useThemeStyles from '@hooks/useThemeStyles';
 import Clipboard from '@libs/Clipboard';
-// import getPlatform from '@libs/getPlatform';
 import Navigation from '@libs/Navigation/Navigation';
-// import * as ReportUtils from '@libs/ReportUtils';
 import * as Url from '@libs/Url';
-// import * as UserUtils from '@libs/UserUtils';
 import CONST from '@src/CONST';
 import ROUTES from '@src/ROUTES';
 import type {Report} from '@src/types/onyx';
@@ -36,36 +29,14 @@ function ShareCodePage({report}: ShareCodePageProps) {
     const themeStyles = useThemeStyles();
     const {translate} = useLocalize();
     const {environmentURL} = useEnvironment();
-    // const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
     const currentUserPersonalDetails = useCurrentUserPersonalDetails();
 
     const isReport = !!report?.reportID;
 
-    // const subtitle = useMemo(() => {
-    //     if (isReport) {
-    //         if (ReportUtils.isExpenseReport(report)) {
-    //             return ReportUtils.getPolicyName(report);
-    //         }
-    //         if (ReportUtils.isMoneyRequestReport(report)) {
-    //             // generate subtitle from participants
-    //             return ReportUtils.getVisibleMemberIDs(report)
-    //                 .map((accountID) => ReportUtils.getDisplayNameForParticipant(accountID))
-    //                 .join(' & ');
-    //         }
-
-    //         return ReportUtils.getParentNavigationSubtitle(report).workspaceName ?? ReportUtils.getChatRoomSubtitle(report);
-    //     }
-
-    //     return currentUserPersonalDetails.login;
-    // }, [report, currentUserPersonalDetails, isReport]);
-
-    // const title = isReport ? ReportUtils.getReportName(report) : currentUserPersonalDetails.displayName ?? '';
     const urlWithTrailingSlash = Url.addTrailingForwardSlash(environmentURL);
     const url = isReport
         ? `${urlWithTrailingSlash}${ROUTES.REPORT_WITH_ID.getRoute(report.reportID)}`
         : `${urlWithTrailingSlash}${ROUTES.PROFILE.getRoute(currentUserPersonalDetails.accountID ?? '')}`;
-    // const platform = getPlatform();
-    // const isNative = platform === CONST.PLATFORM.IOS || platform === CONST.PLATFORM.ANDROID;
 
     return (
         <ScreenWrapper testID={ShareCodePage.displayName}>
@@ -79,7 +50,6 @@ function ShareCodePage({report}: ShareCodePageProps) {
                     {/* 
                     This is a temporary measure because right now it's broken because of the Fabric update.
                     We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
-                    That's why you see parts of the code commented.
                     
                     Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
 
diff --git a/src/pages/workspace/WorkspaceProfileSharePage.tsx b/src/pages/workspace/WorkspaceProfileSharePage.tsx
index 5d7cc9b3e58d..0e81df7cb40b 100644
--- a/src/pages/workspace/WorkspaceProfileSharePage.tsx
+++ b/src/pages/workspace/WorkspaceProfileSharePage.tsx
@@ -1,14 +1,9 @@
 import React from 'react';
 import {View} from 'react-native';
-// import type {ImageSourcePropType} from 'react-native';
-// import expensifyLogo from '@assets/images/expensify-logo-round-transparent.png';
 import ContextMenuItem from '@components/ContextMenuItem';
 import HeaderWithBackButton from '@components/HeaderWithBackButton';
 import * as Expensicons from '@components/Icon/Expensicons';
-// import MenuItem from '@components/MenuItem';
 import {useSession} from '@components/OnyxProvider';
-// import QRShareWithDownload from '@components/QRShare/QRShareWithDownload';
-// import type QRShareWithDownloadHandle from '@components/QRShare/QRShareWithDownload/types';
 import ScreenWrapper from '@components/ScreenWrapper';
 import ScrollView from '@components/ScrollView';
 import useEnvironment from '@hooks/useEnvironment';
@@ -17,9 +12,7 @@ import useThemeStyles from '@hooks/useThemeStyles';
 import useWindowDimensions from '@hooks/useWindowDimensions';
 import Clipboard from '@libs/Clipboard';
 import Navigation from '@libs/Navigation/Navigation';
-// import shouldAllowDownloadQRCode from '@libs/shouldAllowDownloadQRCode';
 import * as Url from '@libs/Url';
-// import CONST from '@src/CONST';
 import ROUTES from '@src/ROUTES';
 import withPolicy from './withPolicy';
 import type {WithPolicyProps} from './withPolicy';
@@ -28,11 +21,9 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
     const themeStyles = useThemeStyles();
     const {translate} = useLocalize();
     const {environmentURL} = useEnvironment();
-    // const qrCodeRef = useRef<QRShareWithDownloadHandle>(null);
     const {isSmallScreenWidth} = useWindowDimensions();
     const session = useSession();
 
-    // const policyName = policy?.name ?? '';
     const id = policy?.id ?? '';
     const adminEmail = session?.email ?? '';
     const urlWithTrailingSlash = Url.addTrailingForwardSlash(environmentURL);
@@ -54,7 +45,6 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
                         {/* 
                             This is a temporary measure because right now it's broken because of the Fabric update.
                             We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
-                            That's why you see parts of the code commented.
                             
                             Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
 

From 67d6942cc489509b18c7a0bfbef6620c99c35018 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= <lucien@expensify.com>
Date: Thu, 11 Apr 2024 16:24:26 +0200
Subject: [PATCH 5/6] only keep comment

---
 src/pages/ShareCodePage.tsx                   | 26 ++-------------
 .../workspace/WorkspaceProfileSharePage.tsx   | 32 ++++---------------
 2 files changed, 10 insertions(+), 48 deletions(-)

diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx
index d0d832b2b615..0a3b421e802f 100644
--- a/src/pages/ShareCodePage.tsx
+++ b/src/pages/ShareCodePage.tsx
@@ -46,23 +46,13 @@ function ShareCodePage({report}: ShareCodePageProps) {
                 shouldShowBackButton
             />
             <ScrollView style={[themeStyles.flex1, themeStyles.pt3]}>
-                <View style={[themeStyles.workspaceSectionMobile, themeStyles.ph5]}>
-                    {/* 
+                 {/* 
+                    Right now QR code download button is not shown anymore
                     This is a temporary measure because right now it's broken because of the Fabric update.
                     We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
                     
                     Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
-
-                    <QRShareWithDownload
-                        ref={qrCodeRef}
-                        url={url}
-                        title={title}
-                        subtitle={subtitle}
-                        logo={isReport ? expensifyLogo : (UserUtils.getAvatarUrl(currentUserPersonalDetails?.avatar, currentUserPersonalDetails?.accountID) as ImageSourcePropType)}
-                        logoRatio={isReport ? CONST.QR.EXPENSIFY_LOGO_SIZE_RATIO : CONST.QR.DEFAULT_LOGO_SIZE_RATIO}
-                        logoMarginRatio={isReport ? CONST.QR.EXPENSIFY_LOGO_MARGIN_RATIO : CONST.QR.DEFAULT_LOGO_MARGIN_RATIO}
-                    /> */}
-                </View>
+                */}
 
                 <View style={themeStyles.mt9}>
                     <ContextMenuItem
@@ -75,16 +65,6 @@ function ShareCodePage({report}: ShareCodePageProps) {
                         shouldLimitWidth={false}
                     />
 
-                    {/* {isNative && (
-                        <MenuItem
-                            isAnonymousAction
-                            title={translate('common.download')}
-                            icon={Expensicons.Download}
-                            // eslint-disable-next-line @typescript-eslint/no-misused-promises
-                            onPress={() => qrCodeRef.current?.download?.()}
-                        />
-                    )} */}
-
                     <MenuItem
                         title={translate(`referralProgram.${CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE}.buttonText1`)}
                         icon={Expensicons.Cash}
diff --git a/src/pages/workspace/WorkspaceProfileSharePage.tsx b/src/pages/workspace/WorkspaceProfileSharePage.tsx
index 0e81df7cb40b..916723f60c9f 100644
--- a/src/pages/workspace/WorkspaceProfileSharePage.tsx
+++ b/src/pages/workspace/WorkspaceProfileSharePage.tsx
@@ -41,22 +41,13 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
             />
             <ScrollView style={[themeStyles.flex1, themeStyles.pt2]}>
                 <View style={[themeStyles.flex1, isSmallScreenWidth ? themeStyles.workspaceSectionMobile : themeStyles.workspaceSection]}>
-                    <View style={[themeStyles.workspaceSectionMobile, themeStyles.ph9]}>
-                        {/* 
-                            This is a temporary measure because right now it's broken because of the Fabric update.
-                            We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
-                            
-                            Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
-
-                            <QRShareWithDownload
-                            ref={qrCodeRef}
-                            url={url}
-                            title={policyName}
-                            logo={(policy?.avatar ? policy.avatar : expensifyLogo) as ImageSourcePropType}
-                            logoRatio={CONST.QR.DEFAULT_LOGO_SIZE_RATIO}
-                            logoMarginRatio={CONST.QR.DEFAULT_LOGO_MARGIN_RATIO}
-                        /> */}
-                    </View>
+                    {/* 
+                        Right now QR code download button is not shown anymore
+                        This is a temporary measure because right now it's broken because of the Fabric update.
+                        We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
+                        
+                        Please see https://github.com/Expensify/App/issues/40110 to see if it can be re-enabled.
+                    */}
 
                     <View style={[themeStyles.mt3, themeStyles.ph4]}>
                         <ContextMenuItem
@@ -69,15 +60,6 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
                             shouldLimitWidth={false}
                             wrapperStyle={themeStyles.sectionMenuItemTopDescription}
                         />
-                        {/* {shouldAllowDownloadQRCode && (
-                            <MenuItem
-                                isAnonymousAction
-                                title={translate('common.download')}
-                                icon={Expensicons.Download}
-                                onPress={() => qrCodeRef.current?.download?.()}
-                                wrapperStyle={themeStyles.sectionMenuItemTopDescription}
-                            />
-                        )} */}
                     </View>
                 </View>
             </ScrollView>

From 1d978c3657195ea398208bc2496eb3951da7a46b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= <lucien@expensify.com>
Date: Thu, 11 Apr 2024 16:35:12 +0200
Subject: [PATCH 6/6] fix prettier

---
 src/pages/ShareCodePage.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx
index 0a3b421e802f..ce2d8e005e4d 100644
--- a/src/pages/ShareCodePage.tsx
+++ b/src/pages/ShareCodePage.tsx
@@ -46,7 +46,7 @@ function ShareCodePage({report}: ShareCodePageProps) {
                 shouldShowBackButton
             />
             <ScrollView style={[themeStyles.flex1, themeStyles.pt3]}>
-                 {/* 
+                {/* 
                     Right now QR code download button is not shown anymore
                     This is a temporary measure because right now it's broken because of the Fabric update.
                     We need to wait for react-native v0.74 to be released so react-native-view-shot gets fixed.
