대시보드, 기기에러, 계정관리 수정
This commit is contained in:
@@ -20,6 +20,28 @@ export default function SignInForm() {
|
||||
const [user_pw, setUserPw] = useState("");
|
||||
const [showPassword, setShowPassword] = useState(false);
|
||||
const [isChecked, setIsChecked] = useState(false);
|
||||
const [isSendingSms, setIsSendingSms] = useState(false); //TempCode: SMS integration test
|
||||
|
||||
// TempCode: SMS integration test, remove when done
|
||||
const handleSendSmsTest = () => {
|
||||
setIsSendingSms(true);
|
||||
|
||||
api.post('/api/send-sms-test.do')
|
||||
.then((resp) => {
|
||||
console.log(resp);
|
||||
|
||||
const r = resp.data;
|
||||
if (r.code === "0000")
|
||||
alert("문자를 전송했습니다.\n수신번호: " + r.phone + "\n잔여건수: " + r.remainCount);
|
||||
else
|
||||
alert("문자 전송에 실패했습니다.\n코드: " + r.code + "\n메시지: " + r.msg);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
alert("문자 전송 요청에 실패했습니다.");
|
||||
})
|
||||
.finally(() => setIsSendingSms(false));
|
||||
};
|
||||
|
||||
const handleLogin = () => {
|
||||
//router.push("/"); //TestCode
|
||||
@@ -124,6 +146,12 @@ export default function SignInForm() {
|
||||
로그인
|
||||
</Button>
|
||||
</div>
|
||||
{/* TempCode: SMS integration test, remove when done */}
|
||||
<div>
|
||||
<Button className="w-full" size="sm" variant="outline" onClick={handleSendSmsTest} disabled={isSendingSms}>
|
||||
{isSendingSms ? "문자 전송 중..." : "문자전송 테스트"}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
{/*</form>*/}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user