diff --git a/frontend/components/kanban/DragDrop.component.tsx b/frontend/components/kanban/DragDrop.component.tsx index fd8a691b..eb18a539 100644 --- a/frontend/components/kanban/DragDrop.component.tsx +++ b/frontend/components/kanban/DragDrop.component.tsx @@ -10,7 +10,11 @@ import { useAtom, useAtomValue } from "jotai"; import { KanbanSelectedButtonNumberState } from "@/src/stores/kanban/Navbar.atoms"; import useDragDrop from "@/src/hooks/useDragDrop.hook"; -const KanbanColumnView = () => { +interface KanbanColumnViewProps { + generation: string; +} + +const KanbanColumnView = ({ generation }: KanbanColumnViewProps) => { const navbarId = useAtomValue(KanbanSelectedButtonNumberState); const { @@ -18,7 +22,7 @@ const KanbanColumnView = () => { isError, isLoading, } = useQuery(["kanbanDataArray", navbarId], () => - getAllKanbanData(navbarId) + getAllKanbanData(navbarId, generation) ); if (!kanbanData || isLoading) { @@ -65,7 +69,7 @@ const KanbanBoardDragDropComponent = ({ ref={provided.innerRef} {...provided.droppableProps} > - + {provided.placeholder} diff --git a/frontend/components/kanban/column/ColumnWithBackButton.component.tsx b/frontend/components/kanban/column/ColumnWithBackButton.component.tsx index 094f48b6..423669d7 100644 --- a/frontend/components/kanban/column/ColumnWithBackButton.component.tsx +++ b/frontend/components/kanban/column/ColumnWithBackButton.component.tsx @@ -31,7 +31,7 @@ const KanbanColumnDetailCard = ({ isError, isLoading, } = useQuery(["kanbanDataArray", generation], () => - getAllKanbanData(navbarId) + getAllKanbanData(navbarId, generation) ); if (!kanbanDataArray || isLoading) { diff --git a/frontend/src/apis/kanban/index.ts b/frontend/src/apis/kanban/index.ts index c6ab5ca3..0bb09c03 100644 --- a/frontend/src/apis/kanban/index.ts +++ b/frontend/src/apis/kanban/index.ts @@ -19,9 +19,11 @@ export interface KanbanCardReq { } // TODO: card api 추가 시 수정 필요 -export const getKanbanCards = async (columnId: string) => { +export const getKanbanCards = async (columnId: string, generation: string) => { const { data } = await https.get( - `/navigations/${columnId}/boards` + `/navigations/${columnId}/boards?${new URLSearchParams({ + year: generation, + })}` ); return data; @@ -90,10 +92,11 @@ export const postAddCard = async ({ columnId, title }: addCardReq) => { }; export const getAllKanbanData = async ( - navigationId: string + navigationId: string, + generation: string ): Promise => { const columnsData = await getColums(navigationId); - const cardsData = await getKanbanCards(navigationId); + const cardsData = await getKanbanCards(navigationId, generation); return columnsData.map((column) => { const startColumnCardData = cardsData