From 131233fe7b506f6a1a31039b336c0ae94a32230e Mon Sep 17 00:00:00 2001 From: HyunJinNo Date: Sat, 7 Sep 2024 00:33:41 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EC=A0=95=EB=B3=B4=20=EB=93=B1=EB=A1=9D?= =?UTF-8?q?=20=ED=8E=98=EC=9D=B4=EC=A7=80=20useForm=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=20=EC=8B=9C=20validation=20message=20=EC=B6=9C=EB=A0=A5?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 51 +++++- src/components/diary/write/DiaryEditor.tsx | 21 +-- .../informations/write/InformationEditor.tsx | 112 +++++++----- .../diary/edit/DiaryEditorContainer.tsx | 17 ++ .../diary/write/DiaryEditorContainer.tsx | 18 ++ .../write/InformationEditorContainer.tsx | 162 ++++++++++-------- .../zod/schema/InformationCreateFormSchema.ts | 1 + 7 files changed, 243 insertions(+), 139 deletions(-) diff --git a/package-lock.json b/package-lock.json index 42abfe52..6aba1f15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "lottie-react": "^2.4.0", "next": "14.2.3", "node-html-parser": "^6.1.13", + "rc-slider": "^11.1.5", "react": "^18", "react-date-range": "^2.0.1", "react-dom": "^18", @@ -33,6 +34,7 @@ }, "devDependencies": { "@types/node": "^20", + "@types/rc-slider": "^9.3.1", "@types/react": "^18", "@types/react-date-range": "^1.4.9", "@types/react-dom": "^18", @@ -61,7 +63,6 @@ "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.6.tgz", "integrity": "sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw==", - "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -962,6 +963,16 @@ "parchment": "^1.1.2" } }, + "node_modules/@types/rc-slider": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@types/rc-slider/-/rc-slider-9.3.1.tgz", + "integrity": "sha512-apvhMnpQltIzLIvKfZGeI5uvBK4CoDAnqXlV7rtFRVn4Ecwe5Db32I4LF1sNlhAVevLjLJuE+7Fpi3OnG1mVbg==", + "deprecated": "This is a stub types definition. rc-slider provides its own type definitions, so you do not need this installed.", + "dev": true, + "dependencies": { + "rc-slider": "*" + } + }, "node_modules/@types/react": { "version": "18.3.3", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", @@ -4664,6 +4675,41 @@ "node": ">=0.10" } }, + "node_modules/rc-slider": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-11.1.5.tgz", + "integrity": "sha512-b77H5PbjMKsvkYXAYIkn50QuFX6ICQmCTibDinI9q+BHx65/TV4TeU25+oadhSRzykxs0/vBWeKBwRyySOeWlg==", + "dependencies": { + "@babel/runtime": "^7.10.1", + "classnames": "^2.2.5", + "rc-util": "^5.36.0" + }, + "engines": { + "node": ">=8.x" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-util": { + "version": "5.43.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.43.0.tgz", + "integrity": "sha512-AzC7KKOXFqAdIBqdGWepL9Xn7cm3vnAmjlHqUnoQaTMZYhM4VlXGLkkHHxj/BZ7Td0+SOPKB4RGPboBVKT9htw==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "react-is": "^18.2.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/rc-util/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + }, "node_modules/react": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", @@ -4822,8 +4868,7 @@ "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", diff --git a/src/components/diary/write/DiaryEditor.tsx b/src/components/diary/write/DiaryEditor.tsx index 07de20a6..83242d33 100644 --- a/src/components/diary/write/DiaryEditor.tsx +++ b/src/components/diary/write/DiaryEditor.tsx @@ -5,7 +5,6 @@ import { useDiaryEditorStoreType } from "@/store/diaryEditorStore"; import dynamic from "next/dynamic"; import QuillEditorSkeleton from "@/components/skeleton/common/QuillEditorSkeleton"; import { useFormContext } from "react-hook-form"; -import { parse } from "node-html-parser"; const QuillEditorContainer = dynamic( () => import("@/containers/diary/write/QuillEditorContainer"), @@ -208,25 +207,7 @@ const DiaryEditor = ({