From 9f557cdb20a7f1205688a5195ca21011297eada5 Mon Sep 17 00:00:00 2001 From: Seok93 Date: Wed, 4 Sep 2024 19:55:22 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20#102=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=EC=83=81=ED=83=9C=20=EB=B3=80=EA=B2=BD=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/project-status/UpdateModalProjectStatus.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/modal/project-status/UpdateModalProjectStatus.tsx b/src/components/modal/project-status/UpdateModalProjectStatus.tsx index fa6c43a1..f586622c 100644 --- a/src/components/modal/project-status/UpdateModalProjectStatus.tsx +++ b/src/components/modal/project-status/UpdateModalProjectStatus.tsx @@ -2,6 +2,7 @@ import ModalLayout from '@layouts/ModalLayout'; import ModalPortal from '@components/modal/ModalPortal'; import ModalProjectStatusForm from '@components/modal/project-status/ModalProjectStatusForm'; import ModalFormButton from '@components/modal/ModalFormButton'; +import { useUpdateStatus } from '@hooks/query/useStatusQuery'; import type { SubmitHandler } from 'react-hook-form'; import type { Project } from '@/types/ProjectType'; @@ -18,10 +19,12 @@ export default function UpdateModalProjectStatus({ statusId, onClose: handleClose, }: UpdateModalProjectStatusProps) { - // ToDo: 상태 수정을 위한 네트워크 로직 추가 + const updateMutation = useUpdateStatus(project.projectId, statusId); + + // ToDo: Error 처리 추가 const handleSubmit: SubmitHandler = async (data) => { - console.log(statusId, '수정 폼 제출'); - console.log(data); + updateMutation.mutate(data); + updateMutation.reset(); handleClose(); };