1- // Column.tsx
21import { useEffect , useState } from "react" ;
32import Image from "next/image" ;
43import { CardType } from "@/types/task" ;
@@ -10,20 +9,19 @@ import ColumnDeleteModal from "@/components/columnCard/ColumnDeleteModal";
109import { updateColumn , deleteColumn } from "@/api/columns" ;
1110import { getDashboardMembers } from "@/api/card" ;
1211import { MemberType } from "@/types/users" ;
12+ import { TEAM_ID } from "@/constants/team" ;
1313
1414type ColumnProps = {
1515 columnId : number ;
1616 title ?: string ;
1717 tasks ?: CardType [ ] ;
18- teamId : string ;
1918 dashboardId : number ;
2019} ;
2120
2221export default function Column ( {
2322 columnId,
2423 title = "new Task" ,
2524 tasks = [ ] ,
26- teamId,
2725 dashboardId,
2826} : ColumnProps ) {
2927 const [ columnTitle , setColumnTitle ] = useState ( title ) ;
@@ -39,7 +37,6 @@ export default function Column({
3937 const fetchMembers = async ( ) => {
4038 try {
4139 const result = await getDashboardMembers ( {
42- teamId,
4340 dashboardId,
4441 } ) ;
4542
@@ -56,7 +53,7 @@ export default function Column({
5653 } ;
5754
5855 fetchMembers ( ) ;
59- } , [ teamId , dashboardId ] ) ;
56+ } , [ dashboardId ] ) ;
6057
6158 const handleEditColumn = async ( newTitle : string ) => {
6259 if ( ! newTitle . trim ( ) ) {
@@ -65,7 +62,7 @@ export default function Column({
6562 }
6663
6764 try {
68- const updated = await updateColumn ( { teamId , columnId, title : newTitle } ) ;
65+ const updated = await updateColumn ( { columnId, title : newTitle } ) ;
6966 setColumnTitle ( updated . title ) ;
7067 setIsColumnModalOpen ( false ) ;
7168 alert ( "칼럼 이름이 변경되었습니다." ) ;
@@ -77,7 +74,7 @@ export default function Column({
7774
7875 const handleDeleteColumn = async ( ) => {
7976 try {
80- await deleteColumn ( { teamId , columnId } ) ;
77+ await deleteColumn ( { columnId } ) ;
8178 setIsDeleteModalOpen ( false ) ;
8279 alert ( "칼럼이 삭제되었습니다." ) ;
8380 } catch ( error ) {
@@ -144,7 +141,7 @@ export default function Column({
144141 < TodoModal
145142 isOpen = { isTodoModalOpen }
146143 onClose = { ( ) => setIsTodoModalOpen ( false ) }
147- teamId = { teamId }
144+ teamId = { TEAM_ID }
148145 dashboardId = { dashboardId }
149146 columnId = { columnId }
150147 members = { members }
0 commit comments