Skip to content

Commit fc30d70

Browse files
authored
Merge pull request #189 from part3-4team-Taskify/minji
[Fix] mypage: api 요청 무한 루프 에러 수정
2 parents 013b021 + 61d7183 commit fc30d70

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/components/card/ChangePassword.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { useState } from "react";
2-
import { useRouter } from "next/router";
32
import { changePassword } from "@/api/changepassword";
43
import Input from "@/components/input/Input";
54
import { toast } from "react-toastify";
65

76
export default function ChangePassword() {
8-
const router = useRouter();
97
const [password, setPassword] = useState("");
108
const [newPassword, setNewPassword] = useState("");
119
const [checkNewpassword, setCheckNewPassword] = useState("");

src/pages/mypage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ export default function MyPage() {
4040
};
4141

4242
useEffect(() => {
43-
if (isInitialized && user) {
43+
if (isInitialized) {
4444
fetchDashboards();
45-
fetchUserData();
4645
}
47-
}, [isInitialized, user]);
46+
}, [isInitialized]);
4847

4948
if (!isInitialized || !user) {
5049
return <LoadingSpinner />;

0 commit comments

Comments
 (0)