eip-components-web
Version:
EIP components
17 lines • 424 B
JavaScript
'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