diff --git a/src/component/dialog/KakaoMapDialog.tsx b/src/component/dialog/KakaoMapDialog.tsx index 0d143ce..643268d 100644 --- a/src/component/dialog/KakaoMapDialog.tsx +++ b/src/component/dialog/KakaoMapDialog.tsx @@ -27,9 +27,6 @@ function KakaoMapDialog( const ps = new kakao.maps.services.Places(); ps.keywordSearch(searchField.value, (data: any, status: any, pagination: any) => { - console.log(data); - console.log(status); - console.log(pagination); if (status === kakao.maps.services.Status.OK) { @@ -88,7 +85,6 @@ function KakaoMapDialog(

경도: ${latLng.getLng().toFixed(6)}

길찾기 `; - console.log(selectedPlaceOverlay) if (selectedPlaceOverlay) { selectedPlaceOverlay.setContent(content); selectedPlaceOverlay.setPosition(latLng); diff --git a/src/component/template/component/GalleryTemplate.tsx b/src/component/template/component/GalleryTemplate.tsx index 0d89c3b..52e8e45 100644 --- a/src/component/template/component/GalleryTemplate.tsx +++ b/src/component/template/component/GalleryTemplate.tsx @@ -72,8 +72,8 @@ function GallerySlide( - (slideStyle === 'style1' ? (34 * 2) : 0) + (slideStyle === 'style1' ? 8 : 0); // 이미지 너비 - 간격 const index = Math.floor(scrollPosition / imageWidth); - console.log(`${scrollPosition}, ${imageWidth}`); - console.log(index); + // console.log(`${scrollPosition}, ${imageWidth}`); + // console.log(index); setCurrentImageIndex(index); // 현재 스크롤된 이미지 인덱스를 상태에 저장 }; diff --git a/src/page/invitation/design/InvitationDesign.tsx b/src/page/invitation/design/InvitationDesign.tsx index cc8e72f..d581302 100644 --- a/src/page/invitation/design/InvitationDesign.tsx +++ b/src/page/invitation/design/InvitationDesign.tsx @@ -108,8 +108,8 @@ function InvitationDesign() { (async () => { try { const {data} = await weddingApi.getWedding(url); - setWedding(data); setMode('edit'); + loadTemp(data); } catch (error) { console.error(error); setMode('create'); @@ -117,6 +117,31 @@ function InvitationDesign() { })(); }, []); + const loadTemp = (alt: WeddingDto) => { + const temp = localStorage.getItem(`temp_Design_${url}`); + localStorage.removeItem(`temp_Design_${url}`); + if (temp === null) { + setWedding(alt); + return; + } + + const isLoad = window.confirm('임시 저장된 디자인이 있습니다. 불러오시겠습니까?'); + if (!isLoad) { + setWedding(alt); + return; + } + + const wedding: WeddingDto = JSON.parse(temp); + console.log(wedding); + setWedding(wedding); + } + + const onChangeWedding = (wedding: WeddingDto) => { + console.log(`야호 ${JSON.stringify(wedding, undefined, 2)}`) + localStorage.setItem(`temp_Design_${url}`, JSON.stringify(wedding)); + setWedding(wedding); + } + const saveDesign = async () => { // TODO: Validation switch (mode) { @@ -159,19 +184,19 @@ function InvitationDesign() { case OptionType.Template: children = setWedding({...wedding, template})} + onChange={template => onChangeWedding({...wedding, template})} />; break; case OptionType.BaseInfo: children = setWedding({...wedding, baseInfo})} + onChange={baseInfo => onChangeWedding({...wedding, baseInfo})} />; break; case OptionType.WeddingSchedule: children = setWedding({ + onChange={weddingSchedule => onChangeWedding({ ...wedding, weddingSchedule })} @@ -180,7 +205,7 @@ function InvitationDesign() { case OptionType.WeddingLocation: children = setWedding({ + onChange={weddingPlace => onChangeWedding({ ...wedding, weddingPlace })} @@ -189,13 +214,13 @@ function InvitationDesign() { case OptionType.Greeting: children = setWedding({...wedding, greeting})} + onChange={greeting => onChangeWedding({...wedding, greeting})} />; break; case OptionType.GuestComment: children = setWedding({ + onChange={guestComment => onChangeWedding({ ...wedding, guestComment })} @@ -204,48 +229,51 @@ function InvitationDesign() { case OptionType.BaseMusic: children = setWedding({...wedding, baseMusic})} + onChange={baseMusic => onChangeWedding({...wedding, baseMusic})} />; break; case OptionType.LinkShare: children = setWedding({...wedding, linkShare})} + onChange={linkShare => onChangeWedding({...wedding, linkShare})} />; break; case OptionType.MoneyInfo: children = setWedding({...wedding, moneyInfo})} + onChange={moneyInfo => onChangeWedding({...wedding, moneyInfo})} />; break; case OptionType.Video: children = setWedding({...wedding, video})} + onChange={video => onChangeWedding({...wedding, video})} />; break; case OptionType.Phone: children = setWedding({...wedding, phone})} + onChange={phone => onChangeWedding({...wedding, phone})} />; break; case OptionType.Rsvp: children = setWedding({...wedding, rsvp})} + onChange={rsvp => onChangeWedding({...wedding, rsvp})} />; break; case OptionType.Gallery: children = setWedding({ + onChangeImgDesign={imgDesign => onChangeWedding({ ...wedding, imgDesign })} - onChangeImgList={imgList => setWedding({...wedding, imgList})} + onChangeImgList={imgList => onChangeWedding({ + ...wedding, + imgList + })} /> break; } diff --git a/src/page/notification/NotificationPage.tsx b/src/page/notification/NotificationPage.tsx index 46e6762..4d630fe 100644 --- a/src/page/notification/NotificationPage.tsx +++ b/src/page/notification/NotificationPage.tsx @@ -22,8 +22,6 @@ function NotificationPage() { } catch (error) { } })(); - console.log(Cookies.get('accessToken')) - console.log(Cookies.get('refreshToken')) }, []); return (