diff --git a/__app/component/Scanner/ScannerInit.js b/__app/component/Scanner/ScannerInit.js index daceb04..2443668 100644 --- a/__app/component/Scanner/ScannerInit.js +++ b/__app/component/Scanner/ScannerInit.js @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { handleSuccess, handleError, handleLoading } from '../services/handlerService'; +import Wrapper from '../Wrapper/Wrapper'; let mediaStream = null; let videoUnmount = null; @@ -214,3 +215,5 @@ ScannerInit.defaultProps = { zIndex: 9, cameraType: 'back', }; + +export default Wrapper(ScannerInit); diff --git a/__app/component/TextToSpeech/TextToSpeechInit.js b/__app/component/TextToSpeech/TextToSpeechInit.js index 1727c2b..f734942 100644 --- a/__app/component/TextToSpeech/TextToSpeechInit.js +++ b/__app/component/TextToSpeech/TextToSpeechInit.js @@ -19,7 +19,7 @@ function TextToSpeechInit({ const handlePlay = async () => { if (TextToSpeechInit.isBrowserSupport()) { if (text) { - handleLoading(loadingCb); + handleLoading({ loadingCb }); setIsAudioOn(true); try { const utteranceCbk = await textToSpeech(text); diff --git a/__app/component/VoiceRecognition/VoiceRecognitionInit.js b/__app/component/VoiceRecognition/VoiceRecognitionInit.js index 143a2c7..ac0e87e 100644 --- a/__app/component/VoiceRecognition/VoiceRecognitionInit.js +++ b/__app/component/VoiceRecognition/VoiceRecognitionInit.js @@ -18,7 +18,7 @@ function VoiceRecognition({ const listen = () => { if (VoiceRecognition.isBrowserSupport()) { - handleLoading(loadingCb); + handleLoading({ loadingCb }); const SpeechRecognition = globalThis.SpeechRecognition || globalThis.webkitSpeechRecognition; const recognition = new SpeechRecognition();