Skip to content

Commit 586ec2d

Browse files
authored
Merge pull request #160 from part3-4team-Taskify/feature/Gnb
[Fix, Refactor] 배포 에러 fix: 불필요한 코드 제거 / InvitedDashboard, ChangeBebridge: toast 소멸 후 새로고침 되도록 수정
2 parents 92e17f2 + 9113d3d commit 586ec2d

File tree

11 files changed

+23
-29
lines changed

11 files changed

+23
-29
lines changed

src/components/button/CardButton.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import clsx from "clsx";
44
import Image from "next/image";
55

66
interface CardButtonProps extends React.ButtonHTMLAttributes<HTMLDivElement> {
7-
fullWidth?: boolean;
87
title?: string;
98
showCrown?: boolean;
109
color?: string;
@@ -16,7 +15,6 @@ interface CardButtonProps extends React.ButtonHTMLAttributes<HTMLDivElement> {
1615
}
1716

1817
const CardButton: React.FC<CardButtonProps> = ({
19-
fullWidth,
2018
className,
2119
title = "비브리지",
2220
showCrown = true,

src/components/button/DashboardAddButton.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ import clsx from "clsx";
33
import Image from "next/image";
44

55
interface DashboardAddButtonProps
6-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
7-
fullWidth?: boolean;
8-
}
6+
extends React.ButtonHTMLAttributes<HTMLButtonElement> {}
97

108
const DashboardAddButton: React.FC<DashboardAddButtonProps> = ({
11-
fullWidth = false,
129
className,
1310
children = "새로운 대시보드",
1411
...props

src/components/columnCard/Column.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ export default function Column({
6969
const updated = await updateColumn({ columnId, title: newTitle });
7070
setColumnTitle(updated.title);
7171
setIsColumnModalOpen(false);
72-
toast.success("칼럼 이름이 변경되었습니다.");
72+
toast.success("칼럼이 변경되었습니다.");
7373
} catch (error) {
7474
console.error("칼럼 이름 수정 실패:", error);
75-
toast.error("칼럼 이름 수정 중 오류가 발생했습니다.");
75+
toast.error("칼럼 변경에 실패했습니다.");
7676
}
7777
};
7878

src/components/modal/ChangeBebridge.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ const ChangeBebridge = () => {
5959
payload
6060
);
6161

62-
toast.success("대시보드가 업데이트되었습니다!");
62+
toast.success("대시보드가 변경되었습니다!");
6363
setTimeout(() => {
64-
window.location.reload();
65-
}, 100);
64+
router.reload();
65+
}, 1700);
6666
} catch (error) {
67-
toast.error("업데이트에 실패했습니다.");
67+
console.error("대시보드 변경 실패:", error);
68+
toast.error("대시보드 변경에 실패했습니다.");
6869
}
6970
};
7071

src/components/modal/DeleteDashboardModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default function DeleteDashboardModal({
2626
await axiosInstance.delete(apiRoutes.dashboardDetail(dashboardIdNumber));
2727
router.push(`/mydashboard`);
2828
} catch (error) {
29+
console.error("대시보드 삭제 실패:", error);
2930
toast.error("대시보드 삭제에 실패하였습니다 .");
3031

3132
window.location.reload();

src/components/modal/DeleteMemberModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function DeleteDashboardModal({
2222
await axiosInstance.delete(apiRoutes.memberDetail(id));
2323
window.location.reload();
2424
} catch (error) {
25-
toast.error("구성원 삭제에 실패하였습니다.");
25+
toast.error("구성원 삭제에 실패했습니다.");
2626
console.error("구성원 삭제 실패:", error);
2727
}
2828
};

src/components/modal/NewDashboard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export default function NewDashboard({ onClose, onCreate }: NewDashboardProps) {
3838
const response = await createDashboard(payload);
3939
onCreate?.(response.data);
4040
onClose?.();
41-
} catch {
41+
} catch (error) {
42+
console.error("대시보드 생성 실패:", error);
4243
toast.error("대시보드 생성에 실패했습니다.");
4344
} finally {
4445
setLoading(false);

src/components/modalInput/ModalImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function ModalImage({
5252
onImageSelect(imageUrl);
5353
} catch (error) {
5454
console.error("이미지 업로드 실패:", error);
55-
toast.error("이미지 업로드에 실패했어요.");
55+
toast.error("이미지 업로드에 실패했습니다.");
5656
}
5757
};
5858

src/components/table/InviteRecords.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const InviteRecords = ({ dashboardId }: { dashboardId: string }) => {
6060
console.error("초대 취소 실패:", error);
6161
if (error instanceof AxiosError) {
6262
if (error.response?.status === 403) {
63-
toast.error("대시보드 초대 취소 권한이 없습니다.");
63+
toast.error("초대 취소 권한이 없습니다.");
6464
return;
6565
} else if (error.response?.status === 404) {
6666
toast.error("대시보드가 존재하지 않습니다.");

src/components/table/invited/InvitedDashBoard.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,14 @@ function InvitedList({
6161
inviteAccepted: true,
6262
};
6363
try {
64-
const response = await axiosInstance.put(
65-
apiRoutes.invitationDetail(inviteId),
66-
payload
67-
);
64+
await axiosInstance.put(apiRoutes.invitationDetail(inviteId), payload);
6865
toast.success("대시보드 수락 성공");
6966
setTimeout(() => {
7067
window.location.reload();
71-
}, 100);
68+
}, 1700);
7269
} catch (error) {
73-
toast.error("대시보드 수락 실패");
70+
console.error("수락 실패:", error);
71+
toast.error("초대 수락에 실패했습니다");
7472
}
7573
};
7674

@@ -81,16 +79,14 @@ function InvitedList({
8179
inviteAccepted: false,
8280
};
8381
try {
84-
const response = await axiosInstance.put(
85-
apiRoutes.invitationDetail(inviteId),
86-
payload
87-
);
82+
await axiosInstance.put(apiRoutes.invitationDetail(inviteId), payload);
8883
toast.success("대시보드 거절 성공");
8984
setTimeout(() => {
9085
window.location.reload();
91-
}, 100);
86+
}, 1700);
9287
} catch (error) {
93-
toast.error("대시보드 거절 실패");
88+
console.error("거절 실패:", error);
89+
toast.error("초대 거절에 실패했습니다");
9490
}
9591
};
9692

0 commit comments

Comments
 (0)