UNPKG

eip-components-web

Version:
17 lines 424 B
'use client'; // Try to import Platform, fallback to web detection if not available let Platform = null; try { Platform = require('react-native').Platform; } catch { // React Native not available, assume web Platform = { OS: 'web' }; } const openUrl = (url) => { if (Platform?.OS === 'web' && !!window) { window.open(url, '_self'); } }; export default openUrl; //# sourceMappingURL=openUrl.js.map