Skip to content

Commit

Permalink
Feat: #102 프로젝트 상태 변경 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Seok93 committed Sep 4, 2024
1 parent 1499a8e commit 9f557cd
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -18,10 +19,12 @@ export default function UpdateModalProjectStatus({
statusId,
onClose: handleClose,
}: UpdateModalProjectStatusProps) {
// ToDo: 상태 수정을 위한 네트워크 로직 추가
const updateMutation = useUpdateStatus(project.projectId, statusId);

// ToDo: Error 처리 추가
const handleSubmit: SubmitHandler<ProjectStatusForm> = async (data) => {
console.log(statusId, '수정 폼 제출');
console.log(data);
updateMutation.mutate(data);
updateMutation.reset();
handleClose();
};

Expand Down

0 comments on commit 9f557cd

Please sign in to comment.