-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat: Header UI 추가 #26
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1d1d957
feat: header 추가
pepperdad 9e6af80
feat: logo 추가
pepperdad 70c8eb2
feat: Header 컴포넌트 개선
pepperdad 40db830
Merge branch 'develop' of https://github.com/Project-Catcher/catcher-…
pepperdad f5baaba
fix: logo 경로 변경 및 asset 추가
pepperdad 2b79fae
feat: 로그인 상태에 따라 보이는 헤더 UI 수정
pepperdad 7311b7c
feat: Tabs 컴포넌트로 분리
pepperdad 7506b63
fix: 로그인 상태 확인 로직 수정
pepperdad be19b35
design: close asset 추가
pepperdad 6e9c449
feat: 알림 토글 추가
pepperdad 38a7dc3
feat: 로그인 상태에서 알림, 내 정보 Toggle event 추가
pepperdad 450af02
feat: 내부 알림 컴포넌트 추가 및 프로필,ID 영역 클릭시 토글로 수정
pepperdad 124abdd
feat: 고정 데이터에 타입 추가
pepperdad 3ff8952
fix: scroll position에서 발생하는 불필요한 렌더링 반복 제거
pepperdad f668721
fix: header 컴포넌트 경로 수정
pepperdad 59edce0
feat: MyInfo 내의 반복되는 버튼 컴포넌트로 분리
pepperdad 6587b37
fix: 글자 수 늘어날 시 width 달라지지 않게 width 고정
pepperdad e900733
Merge branch 'develop' of https://github.com/Project-Catcher/catcher-…
pepperdad 06c58e2
Chore: 누락된 캐시파일 추가
NacreousCloud 11c3064
Merge branch 'develop' into feat/header
pepperdad 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
Binary file not shown.
Binary file not shown.
This file contains 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
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.
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.
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 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,41 @@ | ||
// TODO: 동적으로 데이터 받아와서 보여주기 | ||
import Image from "next/image"; | ||
import React from "react"; | ||
import MyInfoButton from "./MyInfoButton"; | ||
|
||
const MyInfo = () => { | ||
return ( | ||
<> | ||
<div | ||
className="absolute top-8 w-0 h-0 border-[12px] border-solid" | ||
style={{ | ||
borderColor: "transparent transparent white transparent", | ||
}} | ||
/> | ||
<div className="absolute top-14 -right-10 w-[339px] bg-white rounded-[15px] shadow py-5 px-3 flex flex-wrap gap-2"> | ||
<MyInfoButton title={"내 일정"} number={523} /> | ||
<MyInfoButton title={"누적 좋아요 수"} number={523} /> | ||
<MyInfoButton title={"예정 일정"} number={523} /> | ||
<MyInfoButton title={"승인 대기 중"} number={523} /> | ||
|
||
<div className="w-[309px] h-[46.17px] bg-purple-500 rounded-[10px] shadow flex-center text-white"> | ||
새로운 일정만들기 | ||
<Image | ||
src="/header/write-icon.svg" | ||
alt="write-icon" | ||
width={14} | ||
height={14} | ||
/> | ||
</div> | ||
<div className="w-[309px] h-[46px] bg-white rounded-[10px] shadow border border-neutral-200 flex-center"> | ||
마이페이지 | ||
</div> | ||
<div className="w-[309px] h-[46px] bg-stone-300 rounded-[10px] shadow flex-center text-white"> | ||
Log out | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default MyInfo; |
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.
이 코드 패치에 대한 간단한 코드 리뷰를 도와드리겠습니다. 잠재적 버그 위험과/또는 개선 제안에 대한 의견을 환영합니다.
빠진 import 문제:
Header
컴포넌트를 가져오는import Header from "header/components"
코드가 추가되었습니다. 이전 코드에서는 해당 import가 누락되었을 가능성이 있으므로 문제는 해결되었습니다.기능 개선 제안: 리액트 애플리케이션의 헤더를 전역으로 사용하려면
<Header />
를 사용하는 것은 좋은 접근 방식입니다. 그러나 각 페이지마다 반복해서<Header />
를 추가해야 하는 번거로움이 있을 수 있습니다. 이를 간소화할 수 있는 방법은 Next.js의 Layout 컴포넌트 아키텍처를 활용하는 것입니다. 레이아웃 컴포넌트를 생성하여 모든 페이지에 적용하고, 레이아웃 컴포넌트 내부에 헤더를 포함시킬 수 있습니다. 이렇게 하면 각 페이지에서 헤더를 중복해서 추가할 필요 없이 공통 레이아웃 컴포넌트에서 관리할 수 있습니다. 이 기능 개선은 코드를 DRY하게 유지하는 데 도움이 될 수 있습니다.위의 리뷰에 따라 모든 import가 올바르게 추가되었고, 헤더가 애플리케이션 전체에서 사용되도록 변경되었습니다.