From 6bc075780dddc65e72ba4d30841d5e537400c31f Mon Sep 17 00:00:00 2001 From: KimSehyeoun Date: Tue, 20 Feb 2024 20:08:30 +0900 Subject: [PATCH] =?UTF-8?q?feature-076=20:=20400=EB=B2=88=EB=8C=80?= =?UTF-8?q?=EC=97=90=EB=A7=8C=20=EC=A4=91=EB=B3=B5=20=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PhoneCheck.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/PhoneCheck.tsx b/src/components/PhoneCheck.tsx index 51edf6b..1b13755 100644 --- a/src/components/PhoneCheck.tsx +++ b/src/components/PhoneCheck.tsx @@ -1,6 +1,7 @@ import React, { useState, useEffect } from "react"; import { sendSMSAPI, checkSMSAPI, sendSMSFindAPI } from '@/apis/sms'; import Container from '@/styles/PhoneCheck'; +import { AxiosError } from "axios"; interface PhoneCheckProps { @@ -100,7 +101,9 @@ const PhoneCheck : React.FC = ({setCheck, tel, setTel, type}) = setToken(data.result.token); } } catch(e){ - setPhoneCertify(true); + const err = e as AxiosError; + if(err.response?.status === 400) + setPhoneCertify(true); } }