From 7b1740fa6b3c781e4d34c111e3adc36a08396938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=82=A8=EC=A0=95=EC=9A=B1?= <113816822+HelloWook@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:54:13 +0900 Subject: [PATCH] =?UTF-8?q?chore=20=20:=20=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=20(#396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore : nav z-index 수정 * chore : 알람 수정 * feat : 지도 편지 생성 * feat : 지도 편지 작성 api 연동 * chore : 수정 * chore : 안 쓰는 error 수정 * chroe : 위경도 수정 * chore : 상태 변경 * chore : 수정 --- .../PostLetterCotainer/PostLetterCotainer.tsx | 6 ++---- .../CreateMapLetterCotainer.tsx | 2 +- src/pages/Map/MapExplorerPage.tsx | 19 ++++++++----------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/components/CreatLetterPage/PostLetterCotainer/PostLetterCotainer.tsx b/src/components/CreatLetterPage/PostLetterCotainer/PostLetterCotainer.tsx index dadc2e81..a533fd5d 100644 --- a/src/components/CreatLetterPage/PostLetterCotainer/PostLetterCotainer.tsx +++ b/src/components/CreatLetterPage/PostLetterCotainer/PostLetterCotainer.tsx @@ -25,12 +25,10 @@ export const PostLetterCotainer = () => { const { addToast } = useToastStore(); - const [title, setTitle] = useState( - storedTitle || '제목을 입력해주세요' - ); + const [title, setTitle] = useState(storedTitle || ''); const [letter, setLetter] = useState(storedLetter || '1'); const [letterContent, setLetterContent] = useState( - storedContent || '내용을 입력해주세요' + storedContent || '' ); const [font, setFont] = useState(storedFont || 'initial'); diff --git a/src/components/CreateMapLetter/CreateMapLetterCotainer/CreateMapLetterCotainer.tsx b/src/components/CreateMapLetter/CreateMapLetterCotainer/CreateMapLetterCotainer.tsx index 489a9864..8d3ca517 100644 --- a/src/components/CreateMapLetter/CreateMapLetterCotainer/CreateMapLetterCotainer.tsx +++ b/src/components/CreateMapLetter/CreateMapLetterCotainer/CreateMapLetterCotainer.tsx @@ -33,7 +33,7 @@ const CreateMapLetterCotainer = () => { // 위도와 경도를 로컬 스토리지에 저장 localStorage.setItem('maplat', lat?.slice(1) || ''); - localStorage.setItem('maplot', lat?.slice(1) || ''); + localStorage.setItem('maplot', lot?.slice(1) || ''); // 상태 관리 const [title, setTitle] = useState(storedTitle || ''); diff --git a/src/pages/Map/MapExplorerPage.tsx b/src/pages/Map/MapExplorerPage.tsx index 04dcaa10..f151243e 100644 --- a/src/pages/Map/MapExplorerPage.tsx +++ b/src/pages/Map/MapExplorerPage.tsx @@ -11,7 +11,6 @@ import { useSearchStore } from '@/stores/useSearchStore'; import { formatDate } from '@/util/formatDate'; import { calculateDaysLeft } from '@/util/calculateDaysLeft'; import { formatDistance } from '@/util/formatDistance'; -import { BackButtonCotainer } from '@/components/Common/BackButtonContainer/BackButtonCotainer'; export const MapExplorerPage = () => { const { searchedLocation } = useSearchStore(); @@ -52,8 +51,6 @@ export const MapExplorerPage = () => { setQuery(event.target.value); }; - const CreateBtnStyle = `text-sample-blue absolute gap-2 p-2 transform -translate-x-12 flex-center bottom-[5rem] translate-y-7 left-[46%] bg-white border border-sample-blue w-52 rounded-2xl`; - return (
@@ -72,22 +69,22 @@ export const MapExplorerPage = () => { /> {error &&

검색 오류: {error.message}

} {!isLoading && !error && data?.length === 0 && ( -

+

검색 결과가 없습니다.

)}
)}
-
+
{!isSearchFocused && ( <> {selectedLetter ? ( <> {searchedLocation ? ( 지도 편지 작성하기 @@ -95,7 +92,7 @@ export const MapExplorerPage = () => { ) : ( e.preventDefault()} > @@ -117,8 +114,8 @@ export const MapExplorerPage = () => { <> {searchedLocation ? ( 지도 편지 작성하기 @@ -126,7 +123,7 @@ export const MapExplorerPage = () => { ) : ( e.preventDefault()} >