-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 전체 피드 페이지 & 내 피드 페이지 구현 #29
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
16 commits
Select commit
Hold shift + click to select a range
3d53879
feat: Feed Page 추가 및 라우팅
heeeeyong dbe73ea
Feat: Tab Bar 컴포넌트 구현
heeeeyong f435ee5
feat: 내 구독 컴포넌트 구현
heeeeyong 8256ee1
feat: 피드 게시글 컴포넌트 구현
heeeeyong 88941ed
feat: 피드 탭&내 피드 탭 페이지 구현
heeeeyong e113ae2
fix: FollowList 오타 수정
heeeeyong 00357e0
fix: leftArrow.svg asset 경로 변경
heeeeyong f7ed552
fix: max-width 수정
heeeeyong 5e4bc7e
fix: type 수정
heeeeyong 7f50d30
fix: post.ts 타입 선언 interface로 수정
heeeeyong f0f436a
fix: css 전역 변수로 수정 & 선언 순서 통일
heeeeyong 262916c
fix: Tab Bar 동적 렌더링 구현
heeeeyong cb27f5c
fix: PostBody.tsx 컴포넌트화
heeeeyong 73996af
fix: isMyFeed 여부에 따라, saveIcon or lockIcon 결정
heeeeyong e2c8a79
fix: isPublic 선택적 선언
heeeeyong 97b73f6
fix: MyFollower 컴포넌트에 FollowerList 추가
heeeeyong 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
File renamed without changes
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.
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 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 |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| import styled from '@emotion/styled'; | ||
| import rightArrow from '../../assets/common/rightArrow.svg'; | ||
|
|
||
| const BookContainer = styled.div` | ||
| display: flex; | ||
| height: 44px; | ||
| padding: 8px 4px 8px 12px; | ||
| flex-direction: row; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| border-radius: 12px; | ||
| background: var(--color-darkgrey-main); | ||
| cursor: pointer; | ||
|
|
||
| .left { | ||
| overflow: hidden; | ||
| max-width: 340px; | ||
| white-space: nowrap; | ||
| color: var(--color-white); | ||
| text-overflow: ellipsis; | ||
| font-size: var(--font-size-base); | ||
| font-weight: var(--font-weight-semibold); | ||
| line-height: 24px; | ||
| } | ||
|
|
||
| .right { | ||
| display: flex; | ||
| flex-direction: row; | ||
| gap: 4px; | ||
| overflow: hidden; | ||
| color: var(--color-grey-100); | ||
| text-align: right; | ||
| text-overflow: ellipsis; | ||
| font-size: var(--font-size-xs); | ||
| font-style: normal; | ||
| font-weight: var(--font-weight-regular); | ||
| line-height: 24px; | ||
|
|
||
| .name { | ||
| max-width: 100px; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| white-space: nowrap; | ||
| } | ||
| } | ||
| `; | ||
|
|
||
| interface BookInfoCardProps { | ||
| bookTitle: string; | ||
| bookAuthor: string; | ||
| } | ||
|
|
||
| const BookInfoCard = ({ bookTitle, bookAuthor }: BookInfoCardProps) => { | ||
| return ( | ||
| <BookContainer> | ||
| <div className="left">{bookTitle}</div> | ||
| <div className="right"> | ||
| <div className="name">{bookAuthor}</div> | ||
| <div className="author">저</div> | ||
| <img src={rightArrow} /> | ||
| </div> | ||
| </BookContainer> | ||
| ); | ||
| }; | ||
|
|
||
| export default BookInfoCard; |
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,39 @@ | ||
| import styled from '@emotion/styled'; | ||
| import PostBody from './PostBody'; | ||
| import PostFooter from './PostFooter'; | ||
| import PostHeader from './PostHeader'; | ||
| import type { FeedPostProps } from '../../types/post'; | ||
|
|
||
| const Container = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| width: 100%; | ||
| min-width: 320px; | ||
| max-width: 540px; | ||
| margin: 0 auto; | ||
| padding: 40px 20px; | ||
| gap: 16px; | ||
| background-color: var(--color-black-main); | ||
| `; | ||
|
|
||
| const BorderBottom = styled.div` | ||
| width: 100%; | ||
| height: 10px; | ||
| background-color: var(--color-darkgrey-dark); | ||
| `; | ||
|
|
||
| const FeedPost = ({ showHeader, isMyFeed, ...postData }: FeedPostProps) => { | ||
| return ( | ||
| <> | ||
| <Container> | ||
| {showHeader && <PostHeader {...postData} />} | ||
| <PostBody {...postData} /> | ||
| <PostFooter isMyFeed={isMyFeed} {...postData} /> | ||
| </Container> | ||
| <BorderBottom /> | ||
| {/* 페이징 처리에서 마지막 게시글인 경우 BorderBottom 안보이게 처리해야함 */} | ||
| </> | ||
|
Comment on lines
+33
to
+35
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. 🛠️ Refactor suggestion BorderBottom 처리 로직을 구현해보세요. 주석에서 언급한 것처럼 페이지네이션 처리에서 마지막 게시글의 BorderBottom을 숨기는 로직이 필요합니다. 이를 구현하기 위해 추가적인 prop이 필요할 것 같습니다. export type FeedPostProps = PostData & {
showHeader: boolean;
isLast?: boolean;
};
const FeedPost = ({ showHeader, isLast, ...postData }: FeedPostProps) => {
return (
<>
<Container>
{showHeader && <PostHeader {...postData} />}
<PostBody {...postData} />
<PostFooter {...postData} />
</Container>
{!isLast && <BorderBottom />}
</>
);
};🤖 Prompt for AI Agents |
||
| ); | ||
| }; | ||
|
|
||
| export default FeedPost; | ||
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.