BlueWallet/blue_modules/handoff.ios.js

16 lines
463 B
JavaScript
Raw Normal View History

2021-01-19 04:40:11 +01:00
import React, { useContext } from 'react';
import Handoff from 'react-native-handoff';
import { BlueStorageContext } from './storage-context';
import PropTypes from 'prop-types';
const HandoffComponent = props => {
const { isHandOffUseEnabled } = useContext(BlueStorageContext);
return isHandOffUseEnabled && props && props.url ? <Handoff {...props} /> : null;
};
export default HandoffComponent;
HandoffComponent.propTypes = {
url: PropTypes.string,
};