proyecto26 / react-native-inappbrowser

📱InAppBrowser for React Native (Android & iOS) 🤘
https://www.npmjs.com/package/react-native-inappbrowser-reborn
MIT License
1.31k stars 224 forks source link

unwanted popUp #295

Closed saurabhkanswal closed 3 years ago

saurabhkanswal commented 3 years ago

WhatsApp Image 2021-08-23 at 1 28 47 PM

=>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

import {Linking, Alert} from 'react-native'; import {InAppBrowser} from 'react-native-inappbrowser-reborn';

export const openLink = async ({url}) => { try { // const url = 'https://www.proyecto26.com' if (await InAppBrowser.isAvailable()) { const result = await InAppBrowser.open(url, { // Android Properties showTitle: true, toolbarColor: '#F7A828', secondaryToolbarColor: 'black', navigationBarColor: 'black', navigationBarDividerColor: 'white', enableUrlBarHiding: true, enableDefaultShare: true, forceCloseOnRedirection: false,

  });
  Alert.alert(JSON.stringify(result));
} else Linking.openURL(url);

} catch (error) { console.log(error.message); } };

<============================================================

the pop shows when I redirect back to my app by clicking on the close button. Any idea what Iam doing wrong.

jdnichollsc commented 3 years ago

Try removing the alert from your code 😅

saurabhkanswal commented 3 years ago

Try removing the alert from your code 😅

thanks, man sometimes I do a silly mistake

jdnichollsc commented 3 years ago

No problem, me too 😂