Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gift card claim link sharing on android #1223

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Image,
DeviceEventEmitter,
TouchableOpacity,
Platform,
} from 'react-native';
import RNPrint from 'react-native-print';
import RenderHtml from 'react-native-render-html';
Expand Down Expand Up @@ -343,11 +344,11 @@ const GiftCardDetails = ({
description: t('Share Claim Code'),
onPress: async () => {
await sleep(500);
Share.share(
giftCard.claimLink
const dataToShare =
Platform.OS === 'ios' && giftCard.claimLink
? {url: giftCard.claimLink}
: {message: giftCard.claimCode},
);
: {message: giftCard.claimLink || giftCard.claimCode};
Share.share(dataToShare);
},
},
...(defaultClaimCodeType !== 'link'
Expand Down