diff --git a/package-lock.json b/package-lock.json index aab1d94..926bfa6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,7 @@ "react": "^18.3.1", "react-cookie": "^7.2.1", "react-dom": "^18.3.1", + "react-hook-form": "^7.53.1", "react-router-dom": "^6.27.0", "react-scripts": "5.0.1", "react-svg": "^16.1.34", @@ -17195,6 +17196,22 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, + "node_modules/react-hook-form": { + "version": "7.53.1", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.1.tgz", + "integrity": "sha512-6aiQeBda4zjcuaugWvim9WsGqisoUk+etmFEsSUMm451/Ic8L/UAb7sRtMj3V+Hdzm6mMjU1VhiSzYUZeBm0Vg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-hook-form" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18 || ^19" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", diff --git a/package.json b/package.json index a3f4aa7..34f481d 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "react": "^18.3.1", "react-cookie": "^7.2.1", "react-dom": "^18.3.1", + "react-hook-form": "^7.53.1", "react-router-dom": "^6.27.0", "react-scripts": "5.0.1", "react-svg": "^16.1.34", diff --git a/src/components/EditorPage/EditorFooter.jsx b/src/components/EditorPage/EditorFooter.jsx index 1bc25b0..0892aa4 100644 --- a/src/components/EditorPage/EditorFooter.jsx +++ b/src/components/EditorPage/EditorFooter.jsx @@ -14,7 +14,7 @@ function EditorFooter() { className="flex items-center px-2 py-2 font-bold text-gray-400 duration-200 rounded-xl hover:bg-red-500 hover:text-white" onClick={handleGoBack} > - 나가기 + 나가기
+ + +
+
+ {isEditing ? ( + <> + setName(e.target.value)} + /> + setDescription(e.target.value)} + /> + + ) : ( + <> + {name} + {description} + + )} +
+ {!isEditing && ( + + )} + {isEditing && ( +
+ +
+ )} +
+
+ +
+
+
+ 내 코딩케어 제목 + {isEditingTitle ? ( + <> + setBlogTitle(e.target.value)} + /> + + + ) : ( + <> + + {blogTitle} + + + + )} +
+ + 개인 페이지의 좌측 상단에 나타나는 페이지 제목입니다. + +
+
+
+ 이메일 주소 + {isEditingEmail ? ( + <> + setEmail(e.target.value)} + /> + + + ) : ( + <> + + {email} + + + + )} +
+ + 회원 인증 또는 시스템에서 발송하는 이메일을 수신하는 주소입니다. + +
+
+ 소셜 정보 + + 가입 시 등록된 소셜 정보입니다. + +
+
+
+ 회원 탈퇴 + +
+ + 탈퇴 시 작성하신 포스트 및 댓글이 모두 삭제되며 복구되지 않습니다. + +
+
+ + ); +}; + +export default Setting; \ No newline at end of file diff --git a/src/pages/SettingPage.jsx b/src/pages/SettingPage.jsx index 1274bd9..fa10c1b 100644 --- a/src/pages/SettingPage.jsx +++ b/src/pages/SettingPage.jsx @@ -1,7 +1,10 @@ import React from "react"; +import Setting from "../components/Setting"; function SettingPage() { - return
SettingPage123
; + return ( + + ); } export default SettingPage;