-
Notifications
You must be signed in to change notification settings - Fork 0
[NUGUDI-181] 프로필 수정 화면 구현 #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| import { UserProfileEditView } from "@/src/domains/user/presentation/ui/views/user-profile-edit-view"; | ||
|
|
||
| const ProfileEditPage = () => { | ||
| return <div>ProfileEditPage</div>; | ||
| return <UserProfileEditView />; | ||
| }; | ||
|
|
||
| export default ProfileEditPage; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
apps/web/src/domains/user/presentation/schemas/profile-edit.schema.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { z } from "zod"; | ||
|
|
||
| export const profileEditSchema = z.object({ | ||
| nickname: z | ||
| .string() | ||
| .min(2, "닉네임은 최소 2자 이상이어야 합니다") | ||
| .max(10, "닉네임은 최대 10자까지 가능합니다") | ||
| .regex( | ||
| /^[a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ]+$/, | ||
| "닉네임은 영문, 한글, 숫자만 사용할 수 있습니다", | ||
| ) | ||
| .refine((val) => !val.includes(" "), { | ||
| message: "닉네임에 공백을 포함할 수 없습니다", | ||
| }), | ||
| height: z | ||
| .number() | ||
| .min(130, "키는 최소 130cm 이상이어야 합니다") | ||
| .max(220, "키는 최대 220cm까지 입력 가능합니다") | ||
| .optional(), | ||
| weight: z | ||
| .number() | ||
| .min(30, "몸무게는 최소 30kg 이상이어야 합니다") | ||
| .max(250, "몸무게는 최대 250kg까지 입력 가능합니다") | ||
| .optional(), | ||
| }); | ||
|
|
||
| export type ProfileEditFormData = z.infer<typeof profileEditSchema>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...src/domains/user/presentation/shared/ui/sections/user-points-history-section/index.css.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { vars } from "@nugudi/themes"; | ||
| import { style } from "@vanilla-extract/css"; | ||
|
|
||
| export const container = style({ | ||
| backgroundColor: vars.colors.$static.light.color.white, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
에러 상태와 콘텐츠 상태의 UI가 중복됩니다.
Line 57-72의 에러 UI와 Line 96-111의 실제 콘텐츠 UI가 거의 동일한 구조입니다. 공통 컴포넌트로 추출하여 코드 중복을 제거할 수 있습니다.
다음과 같이 공통 컴포넌트로 추출할 수 있습니다:
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 브랜치는 프로필 수정 컴포넌트와 관련되어있으므로, 이 부분은 추후 실제로 프로필 연결 과정에서 수정하도록 하겟습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hijjoy, 이해했습니다! 현재 PR의 범위를 고려하면 합리적인 결정입니다.
추후 프로필 연결 작업 시 이 리팩토링을 잊지 않도록 후속 이슈를 생성하시겠습니까? 원하신다면 제가 이슈를 만들어 드릴 수 있습니다.