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 =