From 84fa9090e0f0b5892b174ec924ad13ff71246506 Mon Sep 17 00:00:00 2001 From: aken-you Date: Fri, 25 Jul 2025 00:34:11 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20FormField=20props=EC=97=90=20placeh?= =?UTF-8?q?older=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/ui/form/form-field.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/shared/ui/form/form-field.tsx b/src/shared/ui/form/form-field.tsx index 737f3edf..943cb7d4 100644 --- a/src/shared/ui/form/form-field.tsx +++ b/src/shared/ui/form/form-field.tsx @@ -14,6 +14,7 @@ type InputType = interface FormFieldProps { label: string; description?: string; + placeholder?: string; type: InputType; maxLength?: number; required?: boolean; @@ -28,6 +29,7 @@ export function FormField({ label, error = false, description, + placeholder, type, required = false, maxLength = 30, @@ -42,7 +44,7 @@ export function FormField({ return ( <> onChange(e.target.value as T)} @@ -59,7 +61,7 @@ export function FormField({ case 'textarea': return ( ({ onChange(v as T)} /> {description && ( @@ -89,7 +91,7 @@ export function FormField({ options={options} defaultValue={value as string[]} onChange={(v) => onChange(v as T)} - placeholder="선택해주세요" + placeholder={placeholder || '선택해주세요.'} /> {description && (
From b1a754e5117e7c90b26ce91d27d1e2245e05696d Mon Sep 17 00:00:00 2001 From: aken-you Date: Fri, 25 Jul 2025 00:36:28 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=EC=97=B0=EB=9D=BD=EC=B2=98=20v?= =?UTF-8?q?alidation=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/my-page/ui/profile-edit-modal.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/features/my-page/ui/profile-edit-modal.tsx b/src/features/my-page/ui/profile-edit-modal.tsx index dd6a4500..8a0369e3 100644 --- a/src/features/my-page/ui/profile-edit-modal.tsx +++ b/src/features/my-page/ui/profile-edit-modal.tsx @@ -81,9 +81,7 @@ function ProfileEditForm({ // 이름 유효성 검사: 2~10자, 한글 또는 영문만 허용 const isNameValid = /^[가-힣a-zA-Z]{2,10}$/.test(profileForm.name); // 연락처 유효성 검사: "(2~3자리 지역번호)-(3~4자리 번호)-(4자리 번호)" 형식 - const isTelValid = - profileForm.tel.length === 0 || - /^\d{2,3}-\d{3,4}-\d{4}$/.test(profileForm.tel); + const isTelValid = /^\d{2,3}-\d{3,4}-\d{4}$/.test(profileForm.tel); const queryClient = useQueryClient(); const { mutateAsync: updateProfile } = useUpdateUserProfileMutation(memberId); @@ -191,12 +189,13 @@ function ProfileEditForm({ { // 숫자와 하이픈(-)만 입력 허용 From fb5bde7e7929b59a5cbcf8cc909634997d01940d Mon Sep 17 00:00:00 2001 From: aken-you Date: Fri, 25 Jul 2025 00:40:17 +0900 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20github=20input=20placeholder=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/my-page/ui/profile-edit-modal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/features/my-page/ui/profile-edit-modal.tsx b/src/features/my-page/ui/profile-edit-modal.tsx index 8a0369e3..7f2e66fe 100644 --- a/src/features/my-page/ui/profile-edit-modal.tsx +++ b/src/features/my-page/ui/profile-edit-modal.tsx @@ -208,6 +208,7 @@ function ProfileEditForm({ label="Github" type="text" description="본인의 활동을 확인할 수 있는 GitHub 링크를 입력해 주세요." + placeholder="https://github.com/username" value={profileForm.githubLink} onChange={(value) => setProfileForm({