-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/mypage 수정 #30
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
hongggyelim
wants to merge
62
commits into
feature
Choose a base branch
from
feat/mypage
base: feature
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.
Open
Feat/mypage 수정 #30
Changes from 53 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
d048029
feat: text token 생성
hongggyelim 736b653
refactor: text 토큰 적용
hongggyelim ac28230
fix: 스토리북에서 select 열기 위한 제어 추가
hongggyelim d8630a4
chore: styles 배럴파일 수정
hongggyelim 3c919ce
refactor: apps/user text token 적용
hongggyelim f6f8fe0
chore: minor 버전 업데이트
hongggyelim fc6b159
feat: 정보 수정 페이지 작성
hongggyelim c16ea38
fix: select 너비 prop 내부 textinput에 전달
hongggyelim 40f2919
feat: 정보수정 - 필수입력 페이지 작업
hongggyelim 4329947
feat: small bold 추가
hongggyelim dc1485a
Merge branch 'design/text-token' into feat/mypage
hongggyelim 952c344
feat: 필드 타입, 에러 정의
hongggyelim 0243889
feat : 필수 입력 폼
hongggyelim 6e18ece
fix: select disabled 기본값 추가 - hover 스타일 작동
hongggyelim 205ff9d
fix : 배경 호버 시 버튼에도 호버 스타일 적용
hongggyelim 649ec47
refactor : 파일 업로드 상위에서 관리하도록 수정
hongggyelim a9f2ca9
refactor: File 형태로 상위로 전달
hongggyelim 8494192
feat: 마이페이지 필수 폼 완료
hongggyelim 0ef2c48
chore: disabled 기본값 추가
hongggyelim ea249c7
feat: 선택 입력 폼 작성
hongggyelim 3d0ff42
feat: 회원정보 폼 작성
hongggyelim 1b4084f
chore: layout 제거
hongggyelim 7fa46a9
fix: changeset root에서 진행
hongggyelim 17aebca
version : minor bump
hongggyelim 0a36be1
Merge branch 'design/text-token' into feat/mypage
hongggyelim 93867c6
Merge remote-tracking branch 'origin/feature' into feat/mypage
hongggyelim 119c7f6
chore: svg 수정
hongggyelim 1b964fb
fix : PR 리뷰 반영
hongggyelim be473f3
feat: 이미지 삭제 시 File onChange
hongggyelim 0aff4cb
Merge remote-tracking branch 'origin/feature' into feat/mypage
hongggyelim 0ec7573
chore : 파일 최대 개수 제한 로직 중복내용 수정
hongggyelim fb78f3b
fix: watch를 getValues로 대체
hongggyelim 4576010
chore: 키 정규식으로 변경
hongggyelim b4fa25a
chore: line height 수정 및 변수 춝
hongggyelim d360a7f
chore: toast 색상 토큰 추가
hongggyelim c8c35a2
chore: 색상 token 반영
hongggyelim 101b078
Merge branch 'revise/token' into feat/mypage
hongggyelim 8ab61ad
chore: text area 에러메시지 자리 차지 제거
hongggyelim 29e8d83
chore: 마이페이지 ui 변경사항 반영
hongggyelim 5f9af57
fix: optional chain 으로 수정
hongggyelim 8b60623
feat: 이미지 드래그앤드롭 기능 추가
hongggyelim 059bfd9
chore: 글씨 색상 변경
hongggyelim 1f58d1f
feat: tool tip 구현
hongggyelim 48916f1
chore: text 0 기본값 추가, 이미지 있을때 툴팁 보여줌
hongggyelim 9716161
feat: 닉네임 필드 추가
hongggyelim 0b73ce8
chore: 로그인 밑줄 추가
hongggyelim 5575950
chore: css 수정
hongggyelim e575636
Merge remote-tracking branch 'origin/feature' into feat/mypage
hongggyelim 9c51a5c
fix: 메뉴 선택시 드롭다운 닫히도록 수정
hongggyelim f8564a2
fix: header 드롭다운 메뉴 가려지는 이슈 해결을 위해 portal 적용
hongggyelim e8eb330
fix: return 밖 JSX을 조건부 렌더링으로 수정
hongggyelim ff99c97
Merge remote-tracking branch 'origin/feature' into feat/mypage
hongggyelim 744c2ec
feat: 비밀번호 변경 모달 추가
hongggyelim 593a5c4
rename : ui component file
hongggyelim 140c454
modify : 디렉토리 아키텍쳐 수정
hongggyelim 8277598
modify : ROUTES enum 추가
hongggyelim 9a23f85
modify : portal 컴포넌트 적용
hongggyelim 750b7da
modify: 변수명 컨벤션 수정
hongggyelim 5dcc926
modify : add dialog size prop & use useWatch instead watch
hongggyelim 0e29be6
rename some components
hongggyelim 26c39d3
docs: typography mdx 추가
hongggyelim ced30bc
fix: font smooth 추가
hongggyelim 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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@date-project/user": minor | ||
| --- | ||
|
|
||
| modify mypage |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ import UserIcon from "@date-project/user/public/userIcon.svg"; | |
| import { Button } from "@repo/ui"; | ||
| import Link from "next/link"; | ||
| import { useEffect, useRef, useState } from "react"; | ||
| import { createPortal } from "react-dom"; | ||
| import useUserStore from "../../../stores/useUserStore"; | ||
| import type { ListType } from "./listType"; | ||
| import ProfileMenu from "./ProfileMenu"; | ||
|
|
@@ -17,7 +18,9 @@ import { | |
| userProfile, | ||
| } from "./style.css"; | ||
| const Header = () => { | ||
| const [isOpen, setIsOpen] = useState(false); | ||
| const [isOpenDropdown, setIsOpenDropdown] = useState(false); | ||
| const [headerDOM, setHeaderDOM] = useState<HTMLElement | null>(null); | ||
|
|
||
| const { user, setLogout } = useUserStore(); | ||
|
|
||
| const menuRef = useRef<HTMLDivElement | null>(null); | ||
|
|
@@ -38,16 +41,19 @@ const Header = () => { | |
| menuRef.current && | ||
| !menuRef.current.contains(e.target as HTMLElement) | ||
| ) { | ||
| setIsOpen(false); | ||
| setIsOpenDropdown(false); | ||
| } | ||
| }; | ||
|
|
||
| document.addEventListener("click", handleClickOutside); | ||
| return () => { | ||
| document.removeEventListener("click", handleClickOutside); | ||
| }; | ||
| }, [isOpen]); | ||
| }, [isOpenDropdown]); | ||
|
|
||
| useEffect(() => { | ||
| setHeaderDOM(document.getElementById("main")); | ||
| }, []); | ||
| return ( | ||
| <header className={header}> | ||
| <div className={logoWrapper}> | ||
|
|
@@ -66,18 +72,21 @@ const Header = () => { | |
| <button | ||
| className={userProfile} | ||
| type="button" | ||
| onClick={() => setIsOpen((prev) => !prev)} | ||
| onClick={() => setIsOpenDropdown((prev) => !prev)} | ||
| > | ||
| <UserIcon className={userIcon} alt="user" /> | ||
| </button> | ||
| {isOpen && ( | ||
| <ProfileMenu | ||
| name="홍길동" // 유저 정보 넘겨주기 | ||
| tel="010-1234-5678" // 대시 추가해서 string으로 넘겨주기 | ||
| list={profileMenuList} | ||
| ref={menuRef} | ||
| /> | ||
| )} | ||
| {isOpenDropdown && | ||
| createPortal( | ||
|
||
| <ProfileMenu | ||
| name="홍길동" // 유저 정보 넘겨주기 | ||
| tel="010-1234-5678" // 대시 추가해서 string으로 넘겨주기 | ||
| list={profileMenuList} | ||
| ref={menuRef} | ||
| onClose={() => setIsOpenDropdown(false)} | ||
| />, | ||
| headerDOM || document.body, | ||
| )} | ||
| </> | ||
| ) : ( | ||
| <> | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| import { Color, textSprinkles } from "@repo/ui"; | ||
| import { Color, textSprinkles, Zindex } from "@repo/ui"; | ||
|
||
| import { style } from "@vanilla-extract/css"; | ||
| import { calc } from "@vanilla-extract/css-utils"; | ||
|
|
||
| export const header = style({ | ||
| position: "fixed", | ||
|
|
@@ -69,15 +68,18 @@ export const relative = style({ | |
| }); | ||
| // ---- ProfileMenu ---- | ||
| export const menuWrapper = style({ | ||
| position: "absolute", | ||
| right: 0, | ||
| top: calc.add("100%", "28px").toString(), | ||
| position: "fixed", | ||
| top: "80px", | ||
| right: "32px", | ||
|
|
||
| display: "flex", | ||
| flexDirection: "column", | ||
|
|
||
| width: "200px", | ||
| borderRadius: "8px", | ||
| backgroundColor: Color.secondary.default, | ||
|
|
||
| zIndex: Zindex.dropdown, | ||
| }); | ||
|
|
||
| export const infoWrapper = style({ | ||
|
|
||
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.
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.
apps/user/src/app/(auth)/layout.tsx가 적용되는 페이지가 login, signup인데 header를 쓰지않는 페이지인데,
왜 여기에 state값을 저장하려는건지 궁금함
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.
추가로 DOM을 가져오는건 지양하고 ref를 활용했으면 함