Skip to content

Commit fe05a8c

Browse files
committed
[Refactor] api 폴더 구조 변경 및 빌드시 버그있는 컴포넌트 수정
1 parent bbe14f4 commit fe05a8c

File tree

9 files changed

+7
-9
lines changed

9 files changed

+7
-9
lines changed

src/app/(auth)/signup/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const SignupPage = () => {
4444
const onSubmit: SubmitHandler<Signup> = async (data) => {
4545
try {
4646
const { confirmPassword, ...signupData } = data;
47-
const response = await axios.post("/api/auth/signup", signupData);
47+
const response = await axios.post("/api/users", signupData);
4848

4949
toast.success("가입이 완료되었습니다");
5050
reset();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NextRequest, NextResponse } from "next/server";
2-
import { apiClient } from "../../apiClient";
2+
import { apiClient } from "@/app/api/apiClient";
33
import { Signup, SignupResponse } from "@/zodSchema/userSchema";
44
import { AxiosError } from "axios";
55

src/app/mydashboard/components/Pagination.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import toast from "react-hot-toast";
2-
import { BackForwardBtn } from "@/components/button/ButtonComponents";
2+
import { PaginationBtn } from "@/components/button/ButtonComponents";
33
import { Dispatch, SetStateAction, useEffect, useState } from "react";
44

55
interface IProps {
@@ -40,7 +40,7 @@ const Pagination = ({ totalPage, setPage, page }: IProps) => {
4040
}
4141
}
4242

43-
return <BackForwardBtn onClickNext={handlePageNext} onClickPrev={handlePagePrev} disabled={isDisabled} />
43+
return <PaginationBtn onClickNext={handlePageNext} onClickPrev={handlePagePrev} disabledPrev={isDisabled} disabledNext={isDisabled} />;
4444
};
4545

4646
export default Pagination;

src/app/mypage/components/UpdateProfile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const UpdateProfile = () => {
4343
throw new Error("FormData 생성 실패");
4444
}
4545

46-
const response = await axios.post<UploadUserProfileImageResponse>("/api/user/profile/image", formData, {
46+
const response = await axios.post<UploadUserProfileImageResponse>("/api/users/me/image", formData, {
4747
headers: {
4848
"Content-Type": "multipart/form-data",
4949
},

src/components/cards/UpdateCard.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,7 @@ const UpdateCard = () => {
214214

215215
<div className="flex h-[42px] gap-3 md:h-[54px] md:gap-2">
216216
<CancelBtn onClick={() => ""}>취소</CancelBtn>
217-
<ConfirmBtn type="submit" disabled={!isFormValid()}>
218-
수정
219-
</ConfirmBtn>
217+
<ConfirmBtn onClick={handleSubmit}>수정</ConfirmBtn>
220218
</div>
221219
</form>
222220
</section>

src/hooks/useAuth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const useAuth = () => {
1616
const { data: userData, isLoading } = useQuery({
1717
queryKey: ["userProfile"],
1818
queryFn: async () => {
19-
const response = await axios.get("/api/user/profile");
19+
const response = await axios.get("/api/users/me");
2020
return response.data?.user;
2121
},
2222
enabled: !user,

src/hooks/useDashboardMember.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)