Skip to content

Commit ea79c88

Browse files
committed
fix: fix mypage
1 parent 28c7062 commit ea79c88

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/pages/MyPage.jsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ function MyPage() {
5353
const errorData = await response.json();
5454
throw new Error(errorData.message);
5555
}
56+
alert("닉네임이 성공적으로 변경되었습니다.");
57+
navigate("/");
5658
console.log("닉네임 수정 성공");
5759
} catch (err) {
5860
console.log("닉네임 수정 실패");
@@ -70,14 +72,9 @@ function MyPage() {
7072
placeholder="닉네임을 입력해주세요"
7173
onChange={(e) => setName(e.target.value)}
7274
/>
75+
<Button type="submit" title="프로필 수정 완료" className="brown" />
7376
<Button
74-
title="프로필 수정 완료"
75-
className="brown"
76-
onClick={() => {
77-
navigate("/");
78-
}}
79-
/>
80-
<Button
77+
type="button"
8178
title="로그아웃"
8279
onClick={() => {
8380
logout();

0 commit comments

Comments
 (0)