From 217cd0810ef35084475215daf7f74cf530f8624c Mon Sep 17 00:00:00 2001 From: juwon5272 Date: Wed, 27 Nov 2024 11:48:12 +0900 Subject: [PATCH] =?UTF-8?q?[FE][Fix]=20#59=20:=20DTO=20=EA=B5=AC=EC=A1=B0?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/dto/auth.dto.ts | 10 +++------- frontend/src/component/authmodal/AuthModal.tsx | 9 ++++++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/frontend/src/api/dto/auth.dto.ts b/frontend/src/api/dto/auth.dto.ts index 9d63e921..528a074a 100644 --- a/frontend/src/api/dto/auth.dto.ts +++ b/frontend/src/api/dto/auth.dto.ts @@ -1,11 +1,7 @@ export class LoginResEntity { - data: { - token: string | undefined; - userId: string | undefined; - } = { - token: undefined, - userId: undefined, - }; + token: string | undefined; + + userId: string | undefined; } export class RegisterResEntity { diff --git a/frontend/src/component/authmodal/AuthModal.tsx b/frontend/src/component/authmodal/AuthModal.tsx index dd565f01..79493a6b 100644 --- a/frontend/src/component/authmodal/AuthModal.tsx +++ b/frontend/src/component/authmodal/AuthModal.tsx @@ -59,9 +59,9 @@ export const AuthModal = (props: IAuthModalProps) => { const handleLoginClick = () => { doLogin(loginData.id, loginData.pw) .then(el => { - if (el.data?.data.token && el.data?.data.userId) { - saveLocalData(AppConfig.KEYS.LOGIN_TOKEN, el.data?.data.token); - saveLocalData(AppConfig.KEYS.LOGIN_USER, el.data?.data.userId); + if (el.data?.token && el.data?.userId) { + saveLocalData(AppConfig.KEYS.LOGIN_TOKEN, el.data.token); + saveLocalData(AppConfig.KEYS.LOGIN_USER, el.data.userId); } setError(''); props.onClose(); @@ -109,6 +109,7 @@ export const AuthModal = (props: IAuthModalProps) => { placeholder="PW" value={loginData.pw} onChange={handleChange} + type="password" /> {error ?

{error}

: ''} { placeholder="사용할 비밀번호를 입력해주세요." value={registerData.pw} onChange={handleChange} + type="password" /> { placeholder="비밀번호를 한 번 더 입력해주세요." value={registerData.confirmPw} onChange={handleChange} + type="password" /> {error ?

{error}

: ''}