diff --git a/apps/member/src/api/activity.ts b/apps/member/src/api/activity.ts index ef9ebc52..f5efd324 100644 --- a/apps/member/src/api/activity.ts +++ b/apps/member/src/api/activity.ts @@ -337,7 +337,7 @@ export async function postActivityBoard({ url: createPagination(END_POINT.ACTIVITY_GROUP_BOARD, params), body: { ...body, - fileUrls: fileUrl ? fileUrl : undefined, + fileUrls: fileUrl || undefined, }, }); diff --git a/apps/member/src/components/calendar/ScheduleFormSection.tsx b/apps/member/src/components/calendar/ScheduleFormSection.tsx deleted file mode 100644 index 4706aadc..00000000 --- a/apps/member/src/components/calendar/ScheduleFormSection.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { useState } from 'react'; - -import { Button, Grid, Input } from '@clab-platforms/design-system'; - -import Textarea from '@components/common/Textarea/Textarea'; - -import useToast from '@hooks/common/useToast'; -import { useScheduleMutation } from '@hooks/queries'; - -interface Props { - onSubmit: () => void; -} - -export function ScheduleFormSection({ onSubmit }: Props) { - const toast = useToast(); - const [inputs, setInputs] = useState({ - title: '', - detail: '', - startDateTime: '', - endDateTime: '', - }); - - const { scheduleMutate } = useScheduleMutation(); - - const { title, detail, startDateTime, endDateTime } = inputs; - - const handleInputsChange = ( - e: React.ChangeEvent, - ) => { - setInputs((prev) => ({ - ...prev, - [e.target.name]: e.target.value, - })); - }; - - const handleSubmitClick = () => { - if (!title || !detail || !startDateTime || !endDateTime) { - return toast({ - state: 'error', - message: '모든 항목을 입력해주세요.', - }); - } - scheduleMutate({ - scheduleType: 'ALL', - title, - detail, - startDateTime, - endDateTime, - priority: 'HIGH', - }); - onSubmit(); - }; - - return ( -
- -