feat: usePasswordChange 훅 기본 형태 추가
This commit is contained in:
parent
3c3269279c
commit
74807ea889
16
frontend/src/hooks/api/usePasswordChange.js
Normal file
16
frontend/src/hooks/api/usePasswordChange.js
Normal 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 };
|
||||
}
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user