feat: usePasswordChange 훅 기본 형태 추가

This commit is contained in:
정기영 2024-07-30 17:48:13 +09:00
parent 3c3269279c
commit 74807ea889
2 changed files with 19 additions and 4 deletions

View File

@ -0,0 +1,16 @@
import instance from '../../utils/axios/instance';
import { API_URL } from '../../constants';
export function usePasswordChange() {
// TODO: API 수정 후 실제 기능하는지 확인
const passwordChange = (currentPw, newPw, newPwCheck) => {
const newPasswordBody = {
currentPassword: currentPw,
newPassword: newPw,
newPasswordCheck: newPwCheck,
};
return instance.put(`${API_URL}/user/updatepassword/`, newPasswordBody);
};
return { passwordChange };
}

View File

@ -39,12 +39,11 @@ export default function LectureCreatePage() {
</div>
<div className={styles.inputField}>
<label className={styles.label}>설명</label>
<input
className={styles.input}
<textarea
ref={description}
type="text"
className={styles.textarea}
placeholder="강의에 대한 설명을 입력하세요"
/>
></textarea>
</div>
<div className={styles.inputField}>
<label className={styles.label}>강의 계획</label>