import React, { useEffect } from 'react'; import { BluetoothState, BluetoothContextType } from '@widergy/sfp-mobile-toolbox'; import GeneralStep from '../GeneralStep'; interface Props { sourceImage?: any; title: string; description?: string; bluetoothContext: BluetoothContextType; instantNextStep?: Function; children?: any; buttons?: Array; } const StepProbeLinkage = ({ sourceImage, title, description, bluetoothContext, instantNextStep, children, buttons, }: Props) => { useEffect(() => { if (bluetoothContext?.bluetoothState === BluetoothState.IDLE && !bluetoothContext.scanError) { instantNextStep && instantNextStep(); } }, [ bluetoothContext?.bluetoothState, bluetoothContext.scanError, bluetoothContext.scannedDevices, instantNextStep, ]); return ( ); }; export default StepProbeLinkage;