Skip to content

Commit c4fcd58

Browse files
authored
Merge pull request #145 from hhjin1/card-hj
[Style] Card: alert를 toast로 변경 Button: 커서 변경
2 parents 6f5ba0c + 25d9843 commit c4fcd58

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

src/components/button/ColumnsButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const ColumnsButton: React.FC<ButtonProps> = ({
2121
"h-[70px] md:h-[70px] lg:h-[70px]",
2222
"mt-[10px] md:mt-[16px] lg:mt-[20px]",
2323
"text-lg md:text-2lg lg:text-2lg",
24+
"cursor-pointer",
2425
className
2526
)}
2627
{...props}

src/components/button/TodoButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const TodoButton: React.FC<ButtonProps> = ({
2121
"h-[32px] md:h-[40px] lg:h-[40px]",
2222
"mt-[10px] md:mt-[16px] lg:mt-[20px]",
2323
"text-lg md:text-2lg lg:text-2lg",
24+
"cursor-pointer",
2425
className
2526
)}
2627
{...props}

src/components/columnCard/Column.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { TEAM_ID } from "@/constants/team";
1313
import CardList from "./CardList";
1414
import CardDetailModal from "@/components/modalDashboard/CardDetailModal";
1515
import { CardDetailType } from "@/types/cards";
16+
import { toast } from "react-toastify";
1617

1718
type ColumnProps = {
1819
columnId: number;
@@ -60,29 +61,29 @@ export default function Column({
6061

6162
const handleEditColumn = async (newTitle: string) => {
6263
if (!newTitle.trim()) {
63-
alert("칼럼 이름을 입력해주세요.");
64+
toast.error("칼럼 이름을 입력해주세요.");
6465
return;
6566
}
6667

6768
try {
6869
const updated = await updateColumn({ columnId, title: newTitle });
6970
setColumnTitle(updated.title);
7071
setIsColumnModalOpen(false);
71-
alert("칼럼 이름이 변경되었습니다.");
72+
toast.success("칼럼 이름이 변경되었습니다.");
7273
} catch (error) {
7374
console.error("칼럼 이름 수정 실패:", error);
74-
alert("칼럼 이름 수정 중 오류가 발생했습니다.");
75+
toast.error("칼럼 이름 수정 중 오류가 발생했습니다.");
7576
}
7677
};
7778

7879
const handleDeleteColumn = async () => {
7980
try {
8081
await deleteColumn({ columnId });
8182
setIsDeleteModalOpen(false);
82-
alert("칼럼이 삭제되었습니다.");
83+
toast.success("칼럼이 삭제되었습니다.");
8384
} catch (error) {
8485
console.error("칼럼 삭제 실패:", error);
85-
alert("칼럼 삭제에 실패했습니다.");
86+
toast.error("칼럼 삭제에 실패했습니다.");
8687
}
8788
};
8889

src/components/common/CustomToastContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22
import "react-toastify/dist/ReactToastify.css";
3-
import { ToastContainer, Slide, toast } from "react-toastify";
3+
import { ToastContainer, Slide } from "react-toastify";
44

55
const CustomToastContainer = () => {
66
return (

src/pages/dashboard/[dashboardId]/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import SideMenu from "@/components/sideMenu/SideMenu";
1616
import ColumnsButton from "@/components/button/ColumnsButton";
1717
import AddColumnModal from "@/components/columnCard/AddColumnModal";
1818
import { TEAM_ID } from "@/constants/team";
19+
import { toast } from "react-toastify";
1920

2021
export default function Dashboard() {
2122
const router = useRouter();
@@ -139,7 +140,7 @@ export default function Dashboard() {
139140
isCreateDisabled={isCreateDisabled}
140141
onSubmit={async () => {
141142
if (!newColumnTitle.trim()) {
142-
alert("칼럼 이름을 입력해 주세요."); // todo tostify로 바꾸기
143+
toast.error("칼럼 이름을 입력해 주세요.");
143144
return;
144145
}
145146

@@ -154,7 +155,7 @@ export default function Dashboard() {
154155
setIsAddColumnModalOpen(false);
155156
} catch (error) {
156157
console.error("칼럼 생성 실패:", error);
157-
alert("칼럼 생성 중 에러가 발생했어요."); // todo tostify로 바꾸기
158+
toast.error("칼럼 생성 중 에러가 발생했어요.");
158159
}
159160
}}
160161
/>

0 commit comments

Comments
 (0)