diff --git a/package-lock.json b/package-lock.json index 887c991e..42abfe52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "react": "^18", "react-date-range": "^2.0.1", "react-dom": "^18", + "react-easy-crop": "^5.0.8", "react-hook-form": "^7.52.0", "react-icons": "^5.2.1", "react-quill": "^2.0.0", @@ -4008,6 +4009,11 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-wheel": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", + "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA==" + }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", @@ -4696,6 +4702,19 @@ "react": "^18.3.1" } }, + "node_modules/react-easy-crop": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/react-easy-crop/-/react-easy-crop-5.0.8.tgz", + "integrity": "sha512-KjulxXhR5iM7+ATN2sGCum/IyDxGw7xT0dFoGcqUP+ysaPU5Ka7gnrDa2tUHFHUoMNyPrVZ05QA+uvMgC5ym/g==", + "dependencies": { + "normalize-wheel": "^1.0.1", + "tslib": "^2.0.1" + }, + "peerDependencies": { + "react": ">=16.4.0", + "react-dom": ">=16.4.0" + } + }, "node_modules/react-hook-form": { "version": "7.52.0", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.52.0.tgz", diff --git a/src/components/common/FloatingButton.tsx b/src/components/common/FloatingButton.tsx index c7ee8f21..e7c40980 100644 --- a/src/components/common/FloatingButton.tsx +++ b/src/components/common/FloatingButton.tsx @@ -1,79 +1,77 @@ import Image from "next/image"; import Link from "next/link"; -import { forwardRef } from "react"; +import { RefObject } from "react"; import { IoIosArrowUp } from "react-icons/io"; import { MdClose } from "react-icons/md"; interface Props { visible: boolean; + ref: RefObject; onClick: () => void; onScrollToTop: () => void; } -const FloatingButton = forwardRef( - ({ visible, onClick, onScrollToTop }, ref) => { - - return ( -
- {visible && ( -
-
- -

일기

-

등록하기

- - -

모임

-

등록하기

- - -

여행정보

-

등록하기

- -
- +

여행정보

+

등록하기

+
- )} - {!visible && ( - )} +
+ )} + {!visible && ( - - ); - }, -); + )} + + + ); +}; export default FloatingButton; diff --git a/src/components/support/SupportTerms.tsx b/src/components/support/SupportTerms.tsx index 8e4f49bb..cc2eb99b 100644 --- a/src/components/support/SupportTerms.tsx +++ b/src/components/support/SupportTerms.tsx @@ -4,7 +4,9 @@ const SupportTerms = (props: ISupportTerms) => { return (
-

이용약관

+

+ 이용약관 +

제1조 - 목적

@@ -333,15 +335,17 @@ const SupportTerms = (props: ISupportTerms) => {

-

개인정보 처리방침

+

+ 개인정보 처리방침 +

제1조 - 개인정보의 수집 및 이용 목적

- Solitour(이하 "회사"라 합니다)는 다음과 같은 목적을 위해 - 개인정보를 수집하고 이용합니다: + {`Solitour(이하 "회사"라 합니다)는 다음과 같은 목적을 위해 + 개인정보를 수집하고 이용합니다:`}

  • 서비스 제공 및 운영
  • diff --git a/src/containers/diary/edit/DiaryEditorContainer.tsx b/src/containers/diary/edit/DiaryEditorContainer.tsx index ec912b27..21c07d8f 100644 --- a/src/containers/diary/edit/DiaryEditorContainer.tsx +++ b/src/containers/diary/edit/DiaryEditorContainer.tsx @@ -21,7 +21,7 @@ const DiaryEditorContainer = ({ diaryData }: Props) => { const authStore = useAuthStore(); const diaryEditorStore = useDiaryEditorStore(); const [dateRangeModal, setDateRangeModal] = useState(false); - const [placeModal, setPlaceModal] = useState(false); + const [addressModal, setAddressModal] = useState(false); const [loading, setLoading] = useState(false); const onSubmit = async () => { @@ -31,7 +31,6 @@ const DiaryEditorContainer = ({ diaryData }: Props) => { title: diaryEditorStore.title, startDate: diaryEditorStore.startDate, endDate: diaryEditorStore.endDate, - placeName: diaryEditorStore.placeName, address: diaryEditorStore.address, image: parse(diaryEditorStore.contents[0]) @@ -104,10 +103,6 @@ const DiaryEditorContainer = ({ diaryData }: Props) => { 1000 * 60 * 60 * 24, ).toLocaleDateString("ko-KR"), ), - placeName: - diaryData.diaryContentResponse.diaryDayContentResponses.diaryDayContentDetail.map( - (value) => value.place, - ), address: diaryData.diaryContentResponse.diaryDayContentResponses.diaryDayContentDetail.map( (value) => value.place, @@ -137,12 +132,12 @@ const DiaryEditorContainer = ({ diaryData }: Props) => { text="수정" diaryEditorStore={diaryEditorStore} dateRangeModal={dateRangeModal} - placeModal={placeModal} + addressModal={addressModal} loading={loading} showDateRangeModal={() => setDateRangeModal(true)} closeDateRangeModal={() => setDateRangeModal(false)} - showPlaceModal={() => setPlaceModal(true)} - closePlaceModal={() => setPlaceModal(false)} + showAddressModal={() => setAddressModal(true)} + closeAddressModal={() => setAddressModal(false)} setCurrentDay={(day: number) => diaryEditorStore.setDiaryEditor({ currentDay: day }) } diff --git a/src/lib/zod/schema/DiaryUpdateFormSchema.ts b/src/lib/zod/schema/DiaryUpdateFormSchema.ts index dc2123c6..115fc096 100644 --- a/src/lib/zod/schema/DiaryUpdateFormSchema.ts +++ b/src/lib/zod/schema/DiaryUpdateFormSchema.ts @@ -30,14 +30,6 @@ export const DiaryUpdateFormSchema = z.object({ .max(new Date(new Date().getTime() + 1000 * 60 * 60 * 24), { message: "미래에 해당하는 날짜는 입력할 수 없습니다.", }), - placeName: z - .string({ - required_error: "장소를 입력해 주세요.", - invalid_type_error: "PlaceName must be a string.", - }) - .min(1, { message: "장소를 입력해 주세요." }) - .array() - .min(1, { message: "장소를 입력해 주세요." }), address: z .string({ required_error: "주소를 입력해 주세요.",