Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const shareEmailImage = async () => {
const shareOptions = {
title: 'Share file',
email: 'email@example.com',
social: Share.Social.EMAIL,
failOnCancel: false,
urls: [images.image1, images.image2],
};
try {
const ShareResponse = await Share.open(shareOptions);
setResult(JSON.stringify(ShareResponse, null, 2));
} catch (error) {
console.log('Error =>', error);
setResult('error: '.concat(getErrorString(error)));
}
};
shareOnSocialMedia = (platform: string, sharerUrl: string) => () => {
Share.shareSingle({
message: 'pillarproject.io/wallet',
url: 'https://pillarproject.io/wallet',
social: Share.Social[platform.toUpperCase()],
})
.catch(() => {
Linking.openURL(sharerUrl);
});
};