From ebdeca565a4043acc328c4942625dbf5cbd771f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Fri, 27 Sep 2024 15:07:37 +0200 Subject: [PATCH] add comments to indicate platform specific logic should be avoided at all costs --- src/pages/ShareCodePage.tsx | 6 ++++++ src/pages/workspace/WorkspaceProfileSharePage.tsx | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/pages/ShareCodePage.tsx b/src/pages/ShareCodePage.tsx index 0f8edf2c8d63..d2ef35d2daa8 100644 --- a/src/pages/ShareCodePage.tsx +++ b/src/pages/ShareCodePage.tsx @@ -84,6 +84,9 @@ function ShareCodePage({report, policy}: ShareCodePageProps) { }, [report, currentUserPersonalDetails, isReport]); const title = isReport ? ReportUtils.getReportName(report) : currentUserPersonalDetails.displayName ?? ''; + // We should remove this logic once https://github.com/Expensify/App/issues/19834 is done + // We shouldn't introduce platform specific code in our codebase + // This is a temporary solution while Web is not supported for the QR code download feature const platform = getPlatform(); const isNative = platform === CONST.PLATFORM.IOS || platform === CONST.PLATFORM.ANDROID; const urlWithTrailingSlash = Url.addTrailingForwardSlash(environmentURL); @@ -139,6 +142,9 @@ function ShareCodePage({report, policy}: ShareCodePageProps) { onPress={() => Clipboard.setString(url)} shouldLimitWidth={false} /> + {/* Remove this platform specific condition once https://github.com/Expensify/App/issues/19834 is done. + We shouldn't introduce platform specific code in our codebase. + This is a temporary solution while Web is not supported for the QR code download feature */} {isNative && ( + {/* Remove this once https://github.com/Expensify/App/issues/19834 is done. + We shouldn't introduce platform specific code in our codebase. + This is a temporary solution while Web is not supported for the QR code download feature */} {shouldAllowDownloadQRCode && (