mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 10:12:01 +01:00
16 lines
463 B
JavaScript
16 lines
463 B
JavaScript
|
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,
|
||
|
};
|