-
Notifications
You must be signed in to change notification settings - Fork 1
마이페이지 - 프로필 설정 페이지 퍼블리싱 #283
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
Open
suhyeon0111
wants to merge
11
commits into
develop
Choose a base branch
from
design/mypage-profile
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+111
−2
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6885e76
design(mypage-profile): 폼 퍼블리싱
suhyeon0111 3c0453a
design(mypage-profile): 프로필 이미지 퍼블리싱
suhyeon0111 0be0530
refactor(mypage-profile): page 컴포넌트에서 폼 분리
suhyeon0111 1e9372a
Merge branch 'develop' of https://github.com/find-my-item/FMI-FE into…
suhyeon0111 f874491
refactor(mypage-profile): 베럴패턴 추가
suhyeon0111 ebac36d
design(mypage-profile): 닉네임 최대길이 caption 추가
suhyeon0111 0b948fa
chore(mypage-profile): 불필요한 코드 삭제
suhyeon0111 9726a81
refactor(mypage-profile): 퍼블리싱 수정 및 aria-label 수정
suhyeon0111 3c2464a
chore(mypage-profile): 버튼 aria-label 추가
suhyeon0111 6ff61be
feat(mypage-profile): 이미지/ 아이콘 분기
suhyeon0111 e2690e1
chore(img): 이미지 삭제
suhyeon0111 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
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
59 changes: 59 additions & 0 deletions
59
src/app/(route)/mypage/profile/_components/MypageProfileForm/MypageProfileForm.tsx
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,59 @@ | ||
| import { InputText, Button, Icon } from "@/components"; | ||
|
|
||
| const MypageProfileForm = () => { | ||
| const profileImgURL = ""; | ||
|
|
||
| const handleSubmitMypageProfile = () => { | ||
| // TODO(수현): 폼 제출 함수 추가 예정 | ||
| }; | ||
|
|
||
| return ( | ||
| <form onSubmit={handleSubmitMypageProfile} className="flex h-dvh w-full flex-col"> | ||
| <div className="flex justify-center py-[30px]"> | ||
| <div className="relative h-[80px] w-[80px]"> | ||
| {profileImgURL ? ( | ||
| <img | ||
| src={profileImgURL} | ||
| alt="프로필 이미지" | ||
| className="h-[80px] w-[80px] rounded-full" | ||
| /> | ||
|
Comment on lines
+15
to
+19
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image 컴포넌트가 아닌, img 태그로 사용하신 이유가 있으실까요? |
||
| ) : ( | ||
| <Icon name="UserProfile" size={80} /> | ||
| )} | ||
| {/* TODO(수현): 디자인 토큰 변경 요청 해놓은 상태로 등록 시 추후 변경 */} | ||
| <button | ||
| className="absolute left-[52px] top-[52px] h-[28px] w-[28px] rounded-full bg-[#f5f5f5] flex-center" | ||
| aria-label="프로필 이미지 변경 버튼" | ||
| > | ||
| <Icon name="CameraBorder" size={16} /> | ||
| </button> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div className="flex w-full flex-col gap-5 p-5"> | ||
| <InputText | ||
| name="nickname" | ||
| label="닉네임" | ||
| // TODO(수현): 기존 닉네임이 placeholder로 들어갈 예정 | ||
| placeholder="기존 닉네임 표기" | ||
| rule="2~10자, 특수문자/금칙어 제한" | ||
| maxLength={10} | ||
| validation={{ | ||
| required: true, | ||
| maxLength: 10, | ||
| }} | ||
| > | ||
| 중복 확인 | ||
| </InputText> | ||
| </div> | ||
|
|
||
| <div className="sticky bottom-0 mt-auto h-[88px] w-full border-t border-divider-default bg-white px-4 py-3"> | ||
| <Button type="submit" variant="auth" ariaLabel="설정완료 버튼"> | ||
| 설정 완료 | ||
| </Button> | ||
| </div> | ||
| </form> | ||
| ); | ||
| }; | ||
|
|
||
| export default MypageProfileForm; | ||
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 @@ | ||
| export { default as MypageProfileForm } from "./MypageProfileForm/MypageProfileForm"; |
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,31 @@ | ||
| "use client"; | ||
|
|
||
| import { DetailHeader } from "@/components"; | ||
| import { FormProvider, useForm } from "react-hook-form"; | ||
| import { Suspense } from "react"; | ||
| import { MypageProfileForm } from "./_components"; | ||
|
|
||
| interface MypageProfileFormType { | ||
| profile: string; | ||
| nickname: string; | ||
| email: string; | ||
| emailAuth: number; | ||
| } | ||
|
|
||
| const page = () => { | ||
| const methods = useForm<MypageProfileFormType>({ | ||
| mode: "onChange", | ||
| reValidateMode: "onChange", | ||
| }); | ||
|
|
||
| return ( | ||
| <Suspense fallback=""> | ||
| <DetailHeader title="프로필 설정" /> | ||
| <FormProvider {...methods}> | ||
| <MypageProfileForm /> | ||
| </FormProvider> | ||
| </Suspense> | ||
| ); | ||
| }; | ||
|
|
||
| export default page; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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.