From 70037dedb185c72dd3743f453b727ef8dbdbea9e Mon Sep 17 00:00:00 2001 From: Matthew Song Date: Fri, 11 Oct 2024 14:31:22 +0900 Subject: [PATCH] =?UTF-8?q?[KAN-119]=20feat:=20=EB=AA=A8=EC=9E=84=20?= =?UTF-8?q?=EB=A7=8C=EB=93=A4=EA=B3=A0=20=EB=82=98=EC=84=9C=20=EC=A3=BC?= =?UTF-8?q?=EC=B5=9C=EC=9E=90=EA=B0=80=20=EC=9E=90=EB=8F=99=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=B0=B8=EC=97=AC=ED=95=98=EB=8A=94=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 --- src/app/components/Modal/MakeGatheringModal.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/app/components/Modal/MakeGatheringModal.tsx b/src/app/components/Modal/MakeGatheringModal.tsx index c3b5b984..5cbb18e9 100644 --- a/src/app/components/Modal/MakeGatheringModal.tsx +++ b/src/app/components/Modal/MakeGatheringModal.tsx @@ -1,22 +1,26 @@ 'use client'; -import { useRouter } from 'next/navigation'; import postGatherings from '@/app/api/actions/gatherings/postGatherings'; +import postGatheringToJoin from '@/app/api/actions/gatherings/postGatheringToJoin'; + import { LOCATION_OPTIONS, MIN_PARTICIPANTS } from '@/constants/common'; +import objectCheckFalseValue from '@/utils/objectCheckFalseValue'; +import objectExtractTrueValue from '@/utils/objectExtractTrueValue'; + +import { useRouter } from 'next/navigation'; import { FormEvent, useState } from 'react'; import toast from 'react-hot-toast'; + import Button from '../Button/Button'; import BoxSelectGroup from './MakeGatheringModal/BoxSelectGroup'; import CalendarSelect from './MakeGatheringModal/CalendarSelect'; import ImageUploader from './MakeGatheringModal/ImageUploader'; +import NameInput from './MakeGatheringModal/NameInput'; import PlaceDropdown from './MakeGatheringModal/PlaceDropdown'; import RecruitmentNumber from './MakeGatheringModal/RecruitmentNumber'; import SelectTimeChip from './MakeGatheringModal/SelectTimeChip'; import ModalFrame from './ModalFrame'; import ModalHeader from './ModalHeader'; -import NameInput from './MakeGatheringModal/NameInput'; -import objectExtractTrueValue from '@/utils/objectExtractTrueValue'; -import objectCheckFalseValue from '@/utils/objectCheckFalseValue'; interface MakeGatheringModalProps { onClose: () => void; @@ -79,7 +83,11 @@ const MakeGatheringModal = ({ onClose }: MakeGatheringModalProps) => { } onClose(); + + await postGatheringToJoin(data.id); + router.push(`/gatherings/${data.id}`); + toast.success(message); };