Skip to content

Commit

Permalink
add comments to indicate platform specific logic should be avoided at…
Browse files Browse the repository at this point in the history
… all costs
  • Loading branch information
lakchote committed Sep 27, 2024
1 parent 94f3ef9 commit ebdeca5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/ShareCodePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 && (
<MenuItem
isAnonymousAction
Expand Down
3 changes: 3 additions & 0 deletions src/pages/workspace/WorkspaceProfileSharePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
shouldLimitWidth={false}
wrapperStyle={themeStyles.sectionMenuItemTopDescription}
/>
{/* 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 && (
<MenuItem
isAnonymousAction
Expand Down

0 comments on commit ebdeca5

Please sign in to comment.