/* @flow strict-local */
import { NativeModules, Platform } from 'react-native';
import SafariView from 'react-native-safari-view';

export default (url: string): void => {
  if (Platform.OS === 'ios') {
    SafariView.show({ url });
  } else {
    NativeModules.CustomTabsAndroid.openURL(url);
  }
};

@@ -222,16 +222,32 @@
 ow(%7B url
+: encodeURI(url)
  %7D);%0A  %7D

Fix crash on following a link with non-ASCII characters.