|
|
|
@ -64,10 +64,11 @@ export default function LaancQr({ isPopUp, setIsPopUp, data, handlerStep }) {
|
|
|
|
|
desc: <>인증 시간이 만료되었습니다.</> |
|
|
|
|
}); |
|
|
|
|
setIsPopUp(false); |
|
|
|
|
} else if (type === 'user') { |
|
|
|
|
// setIsPolling(true);
|
|
|
|
|
startPolling(); |
|
|
|
|
} |
|
|
|
|
// else if (type === 'user') {
|
|
|
|
|
// // setIsPolling(true);
|
|
|
|
|
// startPolling();
|
|
|
|
|
// }
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// axios 호출 에러 처리 로직
|
|
|
|
@ -81,15 +82,15 @@ export default function LaancQr({ isPopUp, setIsPopUp, data, handlerStep }) {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 사용자 확인 버튼 헨들러
|
|
|
|
|
const handleUserEvent = debounce(async event => { |
|
|
|
|
stopPolling(); |
|
|
|
|
try { |
|
|
|
|
const res = await axios.get(`api/bas/laanc/ts/qr/${data.confirmKey}`); |
|
|
|
|
handleResponse(res, 'user'); |
|
|
|
|
} catch (error) { |
|
|
|
|
handleError(error); |
|
|
|
|
} |
|
|
|
|
}, 3000); |
|
|
|
|
// const handleUserEvent = debounce(async event => {
|
|
|
|
|
// stopPolling();
|
|
|
|
|
// try {
|
|
|
|
|
// const res = await axios.get(`api/bas/laanc/ts/qr/${data.confirmKey}`);
|
|
|
|
|
// handleResponse(res, 'user');
|
|
|
|
|
// } catch (error) {
|
|
|
|
|
// handleError(error);
|
|
|
|
|
// }
|
|
|
|
|
// }, 3000);
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
@ -105,21 +106,15 @@ export default function LaancQr({ isPopUp, setIsPopUp, data, handlerStep }) {
|
|
|
|
|
style={{ |
|
|
|
|
display: 'flex', |
|
|
|
|
justifyContent: 'center', |
|
|
|
|
height: '18vw' |
|
|
|
|
height: '12vw' |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<img src={data?.qrcode} alt='QR Code' /> |
|
|
|
|
</ModalBody> |
|
|
|
|
<ModalFooter> |
|
|
|
|
<Button |
|
|
|
|
color='primary' |
|
|
|
|
// onClick={() => {
|
|
|
|
|
// setIsPopUp(!isPopUp);
|
|
|
|
|
// }}
|
|
|
|
|
onClick={handleUserEvent} |
|
|
|
|
> |
|
|
|
|
확인 |
|
|
|
|
</Button> |
|
|
|
|
<p> |
|
|
|
|
QR코드 스캔 후 드론자격증명 앱을통해 유효성 검사 진행 부탁드립니다.{' '} |
|
|
|
|
</p> |
|
|
|
|
</ModalFooter> |
|
|
|
|
<ErrorModal modal={isErrorModal} setModal={setIsErrorModal} /> |
|
|
|
|
</> |
|
|
|
|