i am I am using the React-Native Share. But isn't supported in Web. It gives the following error.
Error: Share is not supported in this browser
How can i use it with browser support?
const onShare = async () => {
try {
// console.log(data);
const result = await Share.share({
message: `WSLRemit transfer receipt\n\nTransfer number: ${Transaction?.manual_payment_ref} \nThey get: ${Transaction?.recipient_gets} ${Transaction?.target_currency}\nYou sent: ${Transaction?.nominal} ${Transaction?.source_currency}\nTotal paid: ${Transaction?.total} ${Transaction?.source_currency}`,
});
if (result.action === Share.sharedAction) {
if (result.activityType) {
// shared with activity type of result.activityType
} else {
// shared
}
} else if (result.action === Share.dismissedAction) {
// dismissed
}
} catch (error) {
// alert(error.message);
console.log(error);
}
};
Import it from 'react-native'
like
it will work on web as-well.