@@ -8,7 +8,8 @@ import { useNavigate } from 'react-router-dom';
88import Button from '../../../../design-system/ui/Button' ;
99import useEventDetail from '../../../entities/event/hook/useEventHook' ;
1010import { useUpdateEventHook } from '../../../features/dashboard/hook/useEventHook' ;
11- import { OnlineType } from '../../../features/dashboard/model/event' ;
11+ import { formatEventRequest } from '../../../shared/lib/formatEventRequest' ;
12+ import { OnlineType } from '../../../shared/types/baseEventType' ;
1213
1314const EventInfoPage = ( ) => {
1415 const navigate = useNavigate ( ) ;
@@ -29,30 +30,17 @@ const EventInfoPage = () => {
2930
3031 const handleSave = ( ) => {
3132 if ( ! data ?. result . id ) return ;
32- const existing = data . result ;
33+
34+ const formatData = formatEventRequest ( data . result ) ;
3335
3436 mutate (
3537 {
38+ ...formatData ,
3639 title,
37- organizerEmail : email || existing . organizerEmail ,
38- organizerPhoneNumber : phone || existing . organizerPhoneNumber ,
40+ organizerEmail : email ,
41+ organizerPhoneNumber : phone ,
3942 onlineType : selectedOption as OnlineType ,
40- address : address || existing . address ,
41- hostChannelId : 1 ,
42- bannerImageUrl : existing . bannerImageUrl ,
43- startDate : existing . startDate ,
44- endDate : existing . endDate ,
45- startTime : existing . startTime ,
46- endTime : existing . endTime ,
47- location : existing . location ,
48- description : existing . description ,
49- referenceLinks : existing . referenceLinks ,
50- category : existing . category ,
51- hashtags : existing . hashtags ,
52- status : existing . status ,
53- hostChannelName : existing . hostChannelName ,
54- hostChannelDescription : existing . hostChannelDescription ,
55- participantCount : existing . participantCount ,
43+ address,
5644 } ,
5745 {
5846 onSuccess : ( ) => {
0 commit comments