Skip to content

feat: add followlist page, followerlist page#48

Merged
heeeeyong merged 11 commits intodevelopfrom
feature/feed
Jul 18, 2025
Merged

feat: add followlist page, followerlist page#48
heeeeyong merged 11 commits intodevelopfrom
feature/feed

Conversation

@heeeeyong
Copy link
Collaborator

@heeeeyong heeeeyong commented Jul 16, 2025

#οΈβƒ£μ—°κ΄€λœ 이슈

#23 [UI] ν”Όλ“œ νŽ˜μ΄μ§€

πŸ“μž‘μ—… λ‚΄μš©

상황별 μ»΄ν¬λ„ŒνŠΈμ˜ 쑰건뢀 λ Œλ”λ§ 처리λ₯Ό ν™•μΈν•˜κΈ° μœ„ν•΄ λͺ©μ—…데이터λ₯Ό 없어도 λ˜λŠ” λ°μ΄ν„°κΉŒμ§€ ν†΅ν•©ν•΄μ„œ ν•œλ²ˆμ— 넣어놓은 μƒν™©μž…λ‹ˆλ‹€.
API μ—°κ²°ν•  λ•Œ, ν•΄λ‹ΉλΆ€λΆ„ κ°œμ„ ν•  μ˜ˆμ •μž…λ‹ˆλ‹€. μ§€κΈˆμ€ 쑰건뢀 λΆ„κΈ°μ²˜λ¦¬λ§Œ 잘 λ˜μ—ˆλŠ”μ§€ ν™•μΈν•˜μ‹œλ©΄ 될 것 κ°™μŠ΅λ‹ˆλ‹€.
그리고 μ΅œλŒ€ν•œ μž¬ν™œμš©ν•  수 μžˆλŠ” μ»΄ν¬λ„ŒνŠΈλŠ” μž¬ν™œμš©ν–ˆκ³ , 그게 λΉ„νš¨μœ¨μ μΌ 것 같은 κ²½μš°μ—λŠ” κ·Έλƒ₯ λΉ„μŠ·ν•œ μ½”λ“œλΌλ„ μƒˆλ‘œ μ»΄ν¬λ„ŒνŠΈ 및 νŽ˜μ΄μ§€λ₯Ό λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€. λŒ€ν‘œμ μœΌλ‘œ μž¬ν™œμš©ν•œ μ»΄ν¬λ„ŒνŠΈλŠ” UserProfileItem.tsx μž…λ‹ˆλ‹€.
image
image
pathname에 λ”°λΌμ„œ μš°μΈ‘μ— λ²„νŠΌμ΄ λ‹€λ₯Έν˜•νƒœμΈλ° λͺ¨μž„λ°© > λ…μ„œλ©”μ΄νŠΈ νŽ˜μ΄μ§€μ—μ„œ UserProfileItem을 κ°€μ Έλ‹€ 써야할 것 같은데 μ΄λ•Œλ„ pathname으둜 μ²˜λ¦¬ν•˜λŠ”κ²Œ λ‚˜μ„μ§€ 살짝 고민이 λ©λ‹ˆλ‹€.
FeedνŽ˜μ΄μ§€μ˜ μ»΄ν¬λ„ŒνŠΈμ˜ κ²½μš°μ—” MyFeed.tsx / TotalFeed.tsx / OtherFeed.tsx둜 μ»΄ν¬λ„ŒνŠΈ λΆ„λ¦¬ν–ˆκ³ , Feed.tsx와 OtherFeedPage.tsx둜 νŽ˜μ΄μ§€ λΆ„λ¦¬ν–ˆμŠ΅λ‹ˆλ‹€.

  1. 전체 ν”Όλ“œ νƒ­ (Feed.tsx > TotalFeed.tsx)
image image
2. λ‚΄ ν”Όλ“œ νƒ­ (Feed.tsx > MyFeed.tsx)
image image
3. λ‹€λ₯Έ μ‚¬μš©μž ν”Όλ“œ νŽ˜μ΄μ§€ (OtherFeedPage.tsx > OtherFeed.tsx)
image image

πŸ’¬λ¦¬λ·° μš”κ΅¬μ‚¬ν•­

3μ£Όμ°¨λŠ” νŠΉλ³„νžˆ μ—†μŠ΅λ‹ˆλ‹€. 늦게 μ˜¬λ €μ„œ μ£„μ†‘ν•©λ‹ˆλ‹€. 이번주차 μŠ€ν”„λ¦°νŠΈ μ§„λ„λŠ” κ³„νšλŒ€λ‘œ λλ‚΄λ³΄κ² μŠ΅λ‹ˆλ‹€.
4주차에 λ°œκ²¬ν•΄ μˆ˜μ •ν•œ 사항도 ν•΄λ‹Ή PR에 일뢀 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. μ°Έκ³ ν•˜μ„Έμš”!

Summary by CodeRabbit

  • μ‹ κ·œ κΈ°λŠ₯

    • νŒ”λ‘œμ›Œ λͺ©λ‘ 및 μ‚¬μš©μžλ³„ ν”Όλ“œ νŽ˜μ΄μ§€κ°€ μΆ”κ°€λ˜μ–΄, λ‹€λ₯Έ μ‚¬μš©μžμ˜ ν”Όλ“œμ™€ νŒ”λ‘œμ›Œ λͺ©λ‘μ„ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.
    • μ‚¬μš©μž ν”„λ‘œν•„ μ•„μ΄ν…œ μ»΄ν¬λ„ŒνŠΈκ°€ λ„μž…λ˜μ–΄, νŒ”λ‘œμš°/μ–ΈνŒ”λ‘œμš° 및 νŒ”λ‘œμ›Œ λͺ©λ‘ 접근이 κ°€λŠ₯ν•©λ‹ˆλ‹€.
    • νŒ”λ‘œμš°/νŒ”λ‘œμ›Œ λͺ©λ‘μ—μ„œ 각 ν•­λͺ© 클릭 μ‹œ ν•΄λ‹Ή μ‚¬μš©μž ν”Όλ“œλ‘œ 이동할 수 μžˆμŠ΅λ‹ˆλ‹€.
  • κ°œμ„  사항

    • ν”Όλ“œ, νŒ”λ‘œμ›Œ, νŒ”λ‘œμš° λͺ©λ‘ λ“±μ—μ„œ 데이터가 없을 λ•Œ μ•ˆλ‚΄ λ©”μ‹œμ§€κ°€ ν‘œμ‹œλ©λ‹ˆλ‹€.
    • ν”„λ‘œν•„ μ»΄ν¬λ„ŒνŠΈκ°€ κ°œμ„ λ˜μ–΄, νŒ”λ‘œμš° λ²„νŠΌ 및 μƒνƒœκ°€ λ™μ μœΌλ‘œ λ°˜μ˜λ©λ‹ˆλ‹€.
    • νŒ”λ‘œμ›Œ/νŒ”λ‘œμš° 리슀트, ν”„λ‘œν•„ μ˜μ—­μ˜ UI 및 λ„€λΉ„κ²Œμ΄μ…˜μ΄ ν–₯μƒλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

@vercel
Copy link

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
thip βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jul 18, 2025 9:43am

@coderabbitai
Copy link

coderabbitai bot commented Jul 16, 2025

"""

Walkthrough

ν”Όλ“œ κ΄€λ ¨ κΈ°λŠ₯이 λŒ€ν­ ν™•μž₯λ˜μ—ˆμŠ΅λ‹ˆλ‹€. νŒ”λ‘œμš°/νŒ”λ‘œμ›Œ λͺ©λ‘κ³Ό μ‚¬μš©μž ν”„λ‘œν•„ ν•­λͺ©, 타인 ν”Όλ“œ νŽ˜μ΄μ§€, 동적 λΌμš°νŒ… 등이 μΆ”κ°€λ˜μ—ˆμœΌλ©°, κΈ°μ‘΄ ν”Όλ“œΒ·ν”„λ‘œν•„ μ»΄ν¬λ„ŒνŠΈλ“€λ„ λ¦¬νŒ©ν† λ§ 및 μƒν˜Έμž‘μš© κ°œμ„ μ΄ μ΄λ£¨μ–΄μ‘ŒμŠ΅λ‹ˆλ‹€. 빈 μƒνƒœ μ²˜λ¦¬μ™€ λ‚΄λΉ„κ²Œμ΄μ…˜ κΈ°λŠ₯도 λ³΄κ°•λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Changes

파일/경둜 μš”μ•½ λ³€κ²½ λ‚΄μš© μš”μ•½
src/components/feed/FollowList.tsx, src/components/feed/MyFollower.tsx νŒ”λ‘œμš°/νŒ”λ‘œμ›Œ λͺ©λ‘μ— useNavigate 적용, 클릭 μ‹œ λΌμš°νŒ… 처리, νŒ”λ‘œμ›Œ 객체에 userId μΆ”κ°€, μΈν„°λž™μ…˜ μŠ€νƒ€μΌ κ°œμ„ 
src/components/feed/UserProfileItem.tsx μƒˆλ‘œμš΄ UserProfileItem μ»΄ν¬λ„ŒνŠΈ μΆ”κ°€: ν”„λ‘œν•„, νŒ”λ‘œμš° λ²„νŠΌ, λΌμš°νŒ…, μŠ€νƒ€μΌ 및 μΈν„°λž™μ…˜ κ΅¬ν˜„
src/pages/feed/FollowerListPage.tsx μƒˆλ‘œμš΄ FollowerListPage μ»΄ν¬λ„ŒνŠΈ μΆ”κ°€: νŒ”λ‘œμ›Œ λͺ©λ‘ νŽ˜μ΄μ§€, 동적 타이틀, 헀더, 슀크둀 μ˜μ—­ λ“± κ΅¬ν˜„
src/pages/feed/OtherFeedPage.tsx μƒˆλ‘œμš΄ OtherFeedPage μ»΄ν¬λ„ŒνŠΈ μΆ”κ°€: 타인 ν”Όλ“œ νŽ˜μ΄μ§€, 헀더, OtherFeed 및 NavBar μ‚¬μš©
src/pages/index.tsx OtherFeedPage, FollowerListPage 동적 라우트 μΆ”κ°€ (/otherfeed/:userId, /feed/:type)
src/components/feed/MyFeed.tsx, src/components/feed/TotalFeed.tsx ν”Όλ“œκ°€ λΉ„μ–΄μžˆμ„ λ•Œ 빈 μƒνƒœ λ©”μ‹œμ§€ ν‘œμ‹œ 둜직 및 μŠ€νƒ€μΌ μΆ”κ°€
src/components/feed/OtherFeed.tsx μƒˆλ‘œμš΄ OtherFeed μ»΄ν¬λ„ŒνŠΈ μΆ”κ°€: 타인 ν”Όλ“œ λ Œλ”λ§, 빈 μƒνƒœ 처리, ν”„λ‘œν•„ μ„Ήμ…˜ always follow button
src/components/feed/Profile.tsx MyProfile β†’ Profile둜 λ¦¬νŒ©ν† λ§, λͺ¨μ˜ ν”„λ‘œν•„ 데이터 μ‚¬μš©, follow λ²„νŠΌ 쑰건뢀 λ Œλ”λ§, μŠ€νƒ€μΌ λ³€μˆ˜ κ°œμ„ 
src/components/feed/TotalBar.tsx μƒˆλ‘œμš΄ TotalBar μ»΄ν¬λ„ŒνŠΈ μΆ”κ°€: 전체 개수 ν‘œμ‹œμš© λ°” κ΅¬ν˜„

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant FeedPage
    participant FollowList
    participant Router
    participant OtherFeedPage
    participant FollowerListPage

    User->>FeedPage: ν”Όλ“œ μ§„μž…
    FeedPage->>FollowList: νŒ”λ‘œμš°/νŒ”λ‘œμ›Œ λͺ©λ‘ ν‘œμ‹œ
    User->>FollowList: νŒ”λ‘œμ›Œ ν•­λͺ© 클릭
    FollowList->>Router: /otherfeed/:userId둜 이동
    Router->>OtherFeedPage: 타인 ν”Όλ“œ νŽ˜μ΄μ§€ λ Œλ”λ§

    User->>FollowList: 더보기(β†’) 클릭
    FollowList->>Router: /feed/followlist둜 이동
    Router->>FollowerListPage: νŒ”λ‘œμ›Œ 전체 λͺ©λ‘ νŽ˜μ΄μ§€ λ Œλ”λ§
Loading

Possibly related PRs

  • THIP-TextHip/THIP-Web#29: κΈ°μ‘΄ FollowList μ»΄ν¬λ„ŒνŠΈμ˜ 초기 κ΅¬ν˜„ PR둜, λ³Έ PR은 ν•΄λ‹Ή μ»΄ν¬λ„ŒνŠΈμ— λ‚΄λΉ„κ²Œμ΄μ…˜ 및 userId κΈ°λŠ₯을 μΆ”κ°€ν•˜μ—¬ μ§μ ‘μ μœΌλ‘œ 연관됨.

Suggested labels

✨ Feature, 🎨 Html&css

Suggested reviewers

  • ho0010

Poem

πŸ‡
ν”Όλ“œμ— μΉœκ΅¬κ°€ λŠ˜μ—ˆμ–΄μš”,
νŒ”λ‘œμš° λͺ©λ‘λ„ 반짝이죠!
클릭 ν•œ 번이면 이웃집,
타인 ν”Όλ“œλ‘œ μŠβ€”
빈 ν”Όλ“œλ„ κ±±μ • λ§ˆμš”,
토끼가 μ‘μ›ν•΄μš”!
πŸ₯•βœ¨
"""


πŸ“œ Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between e7a04b0 and 029b182.

πŸ“’ Files selected for processing (4)
  • src/components/feed/MyFeed.tsx (1 hunks)
  • src/components/feed/OtherFeed.tsx (1 hunks)
  • src/components/feed/Profile.tsx (4 hunks)
  • src/components/feed/TotalBar.tsx (1 hunks)
βœ… Files skipped from review due to trivial changes (1)
  • src/components/feed/TotalBar.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/components/feed/OtherFeed.tsx
  • src/components/feed/MyFeed.tsx
  • src/components/feed/Profile.tsx
✨ Finishing Touches
  • πŸ“ Generate Docstrings

πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@heeeeyong heeeeyong changed the title feat: feat: add followlist page, followerlist page Jul 16, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (8)
src/pages/index.tsx (1)

33-34: 두 λΌμš°νŠΈκ°€ λ™μΌν•œ μ»΄ν¬λ„ŒνŠΈλ₯Ό λ Œλ”λ§ν•©λ‹ˆλ‹€.

ν˜„μž¬ /feed/followerlist와 /feed/followlist 두 라우트 λͺ¨λ‘ λ™μΌν•œ FollowerListPage μ»΄ν¬λ„ŒνŠΈλ₯Ό λ Œλ”λ§ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. ν–₯ν›„ νŒ”λ‘œμ›Œμ™€ νŒ”λ‘œμž‰ 리슀트λ₯Ό κ΅¬λΆ„ν•΄μ„œ λ³΄μ—¬μ€˜μ•Ό ν•œλ‹€λ©΄ 각각 λ‹€λ₯Έ μ»΄ν¬λ„ŒνŠΈλ₯Ό μ‚¬μš©ν•˜κ±°λ‚˜ props둜 κ΅¬λΆ„ν•˜λŠ” 것을 κ³ λ €ν•΄λ³΄μ„Έμš”.

src/components/feed/MyProfile.tsx (1)

21-23: 인라인 μŠ€νƒ€μΌλ§μ„ κ°œμ„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

titleColorλ₯Ό 인라인 μŠ€νƒ€μΌλ‘œ μ μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. μŠ€νƒ€μΌ 일관성을 μœ„ν•΄ styled-components의 propsλ‚˜ CSS λ³€μˆ˜λ₯Ό ν™œμš©ν•˜λŠ” 것을 κ³ λ €ν•΄λ³΄μ„Έμš”.

-<div className="usertitle" style={{ color: titleColor }}>
+<div className="usertitle" style={{ color: titleColor }}>

λ˜λŠ” styled-components propsλ₯Ό ν™œμš©:

<UserTitleDiv $titleColor={titleColor}>
  {userTitle}
</UserTitleDiv>
src/pages/feed/FollowerListPage.tsx (1)

8-42: Mock 데이터 ꡬ쑰λ₯Ό κ°œμ„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

Mock λ°μ΄ν„°μ—μ„œ 일뢀 μ‚¬μš©μžλŠ” followerCountκ°€ 있고 μΌλΆ€λŠ” μ—†μŠ΅λ‹ˆλ‹€. λ˜ν•œ userIdκ°€ μ€‘λ³΅λ˜λŠ” κ²½μš°κ°€ μžˆμŠ΅λ‹ˆλ‹€. 일관성을 μœ„ν•΄ λͺ¨λ“  ν•„λ“œλ₯Ό ν¬ν•¨ν•˜κ³  κ³ μœ ν•œ IDλ₯Ό μ‚¬μš©ν•˜λŠ” 것을 ꢌμž₯ν•©λ‹ˆλ‹€.

const mockUserList: UserProfileItemProps[] = [
  {
    profileImgUrl: 'https://placehold.co/36x36',
    userName: 'ThipOther',
    userTitle: '칭호칭호',
    titleColor: '#FF8BAC',
    followerCount: 15,
-   userId: 1,
+   userId: 1,
+   isFollowed: false,
  },
  // λ‹€λ₯Έ μ‚¬μš©μžλ“€λ„ κ³ μœ ν•œ userId와 λͺ¨λ“  ν•„λ“œ 포함
];
src/components/feed/UserProfileItem.tsx (5)

36-39: API 호좜 μ½”λ“œκ°€ 주석 μ²˜λ¦¬λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

νŒ”λ‘œμš°/μ–ΈνŒ”λ‘œμš° κΈ°λŠ₯이 μ™„μ „νžˆ κ΅¬ν˜„λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. μ‹€μ œ API ν˜ΈμΆœμ„ κ΅¬ν˜„ν•˜κ±°λ‚˜ TODO 주석을 μΆ”κ°€ν•΄μ•Ό ν•©λ‹ˆλ‹€.

μ‹€μ œ API μ—”λ“œν¬μΈνŠΈμ™€ ν•¨κ»˜ μ™„μ „ν•œ κ΅¬ν˜„μ„ μ›ν•˜μ‹œλ©΄ 도움을 λ“œλ¦΄ 수 μžˆμŠ΅λ‹ˆλ‹€.


41-41: ν”„λ‘œλ•μ…˜ μ½”λ“œμ—μ„œ console.logλ₯Ό μ œκ±°ν•˜μ„Έμš”.

ν”„λ‘œλ•μ…˜ ν™˜κ²½μ—μ„œ console.logλŠ” μ œκ±°λ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€.

λ‹€μŒ μˆ˜μ •μ‚¬ν•­μ„ μ μš©ν•˜μ„Έμš”:

-    console.log(`${userName} - ${followed ? 'νŒ”λ‘œμš° μ·¨μ†Œ' : 'νŒ”λ‘œμš° μš”μ²­'}`);
+    // console.log(`${userName} - ${followed ? 'νŒ”λ‘œμš° μ·¨μ†Œ' : 'νŒ”λ‘œμš° μš”μ²­'}`);

61-71: 쑰건뢀 λ Œλ”λ§ λ‘œμ§μ„ κ°œμ„ ν•˜μ„Έμš”.

pathname 기반 쑰건뢀 λ Œλ”λ§μ΄ ν•˜λ“œμ½”λ”©λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. 더 μœ μ—°ν•˜κ³  μœ μ§€λ³΄μˆ˜ν•˜κΈ° μ‰¬μš΄ λ°©μ‹μœΌλ‘œ κ°œμ„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 κ°œμ„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€:

+  const showFollowButton = pathname === '/feed/followlist';
+  const showFollowerListButton = pathname === '/feed/followerlist';
+
-        {pathname === '/feed/followlist' && (
+        {showFollowButton && (
           <div className="followbutton" onClick={toggleFollow}>
             {followed ? '띱 μ·¨μ†Œ' : '띱 ν•˜κΈ°'}
           </div>
         )}
-        {pathname === '/feed/followerlist' && (
+        {showFollowerListButton && (
           <div className="followlistbutton" onClick={handleFollowerListClick}>
             <div>{followerCount}λͺ…이 λ±ν•˜λŠ” 쀑</div>
             <img src={rightArrow} />
           </div>
         )}

33-42: μ—λŸ¬ 핸듀링과 λ‘œλ”© μƒνƒœλ₯Ό μΆ”κ°€ν•˜μ„Έμš”.

API 호좜 μ‹œ μ—λŸ¬ 핸듀링과 λ‘œλ”© μƒνƒœκ°€ μ—†μŠ΅λ‹ˆλ‹€. μ‚¬μš©μž κ²½ν—˜μ„ κ°œμ„ ν•˜κΈ° μœ„ν•΄ μΆ”κ°€ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 κ°œμ„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€:

+  const [isLoading, setIsLoading] = useState(false);
+
-  const toggleFollow = (e: React.MouseEvent) => {
+  const toggleFollow = async (e: React.MouseEvent) => {
     e.stopPropagation();
+    setIsLoading(true);
+    
+    try {
       if (followed) {
-        // await axios.delete(`/api/unfollow/${userName}`);
+        await axios.delete(`/api/unfollow/${userName}`);
       } else {
-        // await axios.post(`/api/follow/${userName}`);
+        await axios.post(`/api/follow/${userName}`);
       }
       setFollowed(prev => !prev);
-      console.log(`${userName} - ${followed ? 'νŒ”λ‘œμš° μ·¨μ†Œ' : 'νŒ”λ‘œμš° μš”μ²­'}`);
+    } catch (error) {
+      console.error('νŒ”λ‘œμš° μƒνƒœ λ³€κ²½ 쀑 였λ₯˜:', error);
+      // μ—λŸ¬ ν† μŠ€νŠΈ λ©”μ‹œμ§€ ν‘œμ‹œ
+    } finally {
+      setIsLoading(false);
+    }
   };

118-118: ν•˜λ“œμ½”λ”©λœ 색상 값을 μ œκ±°ν•˜μ„Έμš”.

CSS λ³€μˆ˜μ™€ ν•˜λ“œμ½”λ”©λœ 색상 값이 ν•¨κ»˜ μ‚¬μš©λ˜κ³  μžˆμŠ΅λ‹ˆλ‹€. 일관성을 μœ„ν•΄ ν•˜λ“œμ½”λ”©λœ 색상 값을 μ œκ±°ν•˜μ„Έμš”.

λ‹€μŒ μˆ˜μ •μ‚¬ν•­μ„ μ μš©ν•˜μ„Έμš”:

-        color: var(--color-text-literature_mint, #a0f8e8);
+        color: var(--color-text-literature_mint);
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 23b6e97 and 2413980.

πŸ“’ Files selected for processing (6)
  • src/components/feed/FollowList.tsx (4 hunks)
  • src/components/feed/MyFollower.tsx (5 hunks)
  • src/components/feed/MyProfile.tsx (3 hunks)
  • src/components/feed/UserProfileItem.tsx (1 hunks)
  • src/pages/feed/FollowerListPage.tsx (1 hunks)
  • src/pages/index.tsx (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/components/feed/MyProfile.tsx (1)
src/pages/signup/Signup.styled.ts (1)
  • Container (3-165)
src/pages/feed/FollowerListPage.tsx (2)
src/components/feed/UserProfileItem.tsx (1)
  • UserProfileItemProps (6-14)
src/components/common/Wrapper.tsx (1)
  • Wrapper (3-14)
πŸ”‡ Additional comments (11)
src/pages/index.tsx (1)

15-15: μƒˆλ‘œμš΄ μ»΄ν¬λ„ŒνŠΈ importκ°€ μ˜¬λ°”λ₯΄κ²Œ μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

FollowerListPage μ»΄ν¬λ„ŒνŠΈλ₯Ό 적절히 importν–ˆμŠ΅λ‹ˆλ‹€.

src/components/feed/MyProfile.tsx (2)

4-9: Mock 데이터 ꡬ쑰가 잘 μ •μ˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

ν”„λ‘œν•„ 데이터λ₯Ό 객체둜 λΆ„λ¦¬ν•˜μ—¬ ν–₯ν›„ API μ—°λ™μ‹œ μ‰½κ²Œ λŒ€μ²΄ν•  수 μžˆλ„λ‘ κ΅¬μ‘°ν™”ν–ˆμŠ΅λ‹ˆλ‹€.


76-79: CSS μŠ€νƒ€μΌλ§ μ—…λ°μ΄νŠΈκ°€ μ μ ˆν•©λ‹ˆλ‹€.

폰트 크기, κ°€μ€‘μΉ˜, 라인 높이 λ“±μ˜ μŠ€νƒ€μΌ 변경이 일관성 있게 μ μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Also applies to: 82-86

src/components/feed/MyFollower.tsx (3)

1-1: λ„€λΉ„κ²Œμ΄μ…˜ 훅이 μ˜¬λ°”λ₯΄κ²Œ μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

useNavigate 훅을 importν•˜κ³  μ‚¬μš©ν•˜μ—¬ νŒ”λ‘œμ›Œ 리슀트 νŽ˜μ΄μ§€λ‘œμ˜ λ„€λΉ„κ²Œμ΄μ…˜μ„ κ΅¬ν˜„ν–ˆμŠ΅λ‹ˆλ‹€.

Also applies to: 62-62


56-59: νƒ€μž… μ •μ˜κ°€ λͺ…ν™•ν•©λ‹ˆλ‹€.

Follower μΈν„°νŽ˜μ΄μŠ€λ₯Ό 톡해 νŒ”λ‘œμ›Œ 객체의 ꡬ쑰λ₯Ό λͺ…ν™•νžˆ μ •μ˜ν–ˆμŠ΅λ‹ˆλ‹€.


85-92: 쑰건뢀 λ Œλ”λ§κ³Ό 클릭 ν•Έλ“€λŸ¬κ°€ μ μ ˆν•©λ‹ˆλ‹€.

νŒ”λ‘œμ›Œκ°€ μžˆμ„ λ•Œλ§Œ UIλ₯Ό λ Œλ”λ§ν•˜κ³ , 클릭 μ‹œ νŒ”λ‘œμ›Œ 리슀트 νŽ˜μ΄μ§€λ‘œ μ΄λ™ν•˜λŠ” κΈ°λŠ₯이 잘 κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

src/components/feed/FollowList.tsx (2)

2-2: λ„€λΉ„κ²Œμ΄μ…˜ 훅이 μ˜¬λ°”λ₯΄κ²Œ μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

useNavigate 훅을 importν•˜κ³  μ‚¬μš©ν•˜μ—¬ λ‹€μ–‘ν•œ νŽ˜μ΄μ§€λ‘œμ˜ λ„€λΉ„κ²Œμ΄μ…˜μ„ κ΅¬ν˜„ν–ˆμŠ΅λ‹ˆλ‹€.

Also applies to: 25-25


50-50: 클릭 ν•Έλ“€λŸ¬κ°€ 적절히 μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

각 UI μš”μ†Œμ— λŒ€ν•œ 클릭 ν•Έλ“€λŸ¬κ°€ λ…Όλ¦¬μ μœΌλ‘œ μ μ ˆν•œ μœ„μΉ˜μ— λ°°μΉ˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Also applies to: 58-58, 61-61

src/pages/feed/FollowerListPage.tsx (2)

78-93: κ³ μ • μœ„μΉ˜ μŠ€νƒ€μΌλ§μ„ κ²€ν† ν•΄μ•Ό ν•©λ‹ˆλ‹€.

TotalBar의 position: fixed와 top: 0 섀정이 헀더와 κ²ΉμΉ  수 μžˆμŠ΅λ‹ˆλ‹€. 헀더 높이λ₯Ό κ³ λ €ν•œ top 값을 μ„€μ •ν•˜κ±°λ‚˜ λ‹€λ₯Έ λ ˆμ΄μ•„μ›ƒ 방식을 κ³ λ €ν•΄λ³΄μ„Έμš”.

ν˜„μž¬ TitleHeader μ»΄ν¬λ„ŒνŠΈμ˜ 높이와 TotalBar의 padding-top: 76px 값이 μ˜¬λ°”λ₯΄κ²Œ κ³„μ‚°λ˜μ—ˆλŠ”μ§€ ν™•μΈν•΄λ³΄μ„Έμš”.


44-49: μ»΄ν¬λ„ŒνŠΈ ꡬ쑰와 λ„€λΉ„κ²Œμ΄μ…˜ κ΅¬ν˜„μ΄ μ μ ˆν•©λ‹ˆλ‹€.

useNavigate(-1)을 μ‚¬μš©ν•œ λ’€λ‘œκ°€κΈ° κΈ°λŠ₯κ³Ό TitleHeader μ»΄ν¬λ„ŒνŠΈλ₯Ό ν™œμš©ν•œ 헀더 ꡬ성이 잘 κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Also applies to: 52-66

src/components/feed/UserProfileItem.tsx (1)

16-75: μ „λ°˜μ μΈ κ΅¬μ‘°λŠ” 잘 κ΅¬μ„±λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

μ»΄ν¬λ„ŒνŠΈμ˜ μ „λ°˜μ μΈ ꡬ쑰와 둜직이 잘 κ΅¬μ„±λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. React Routerλ₯Ό ν™œμš©ν•œ λ„€λΉ„κ²Œμ΄μ…˜κ³Ό 쑰건뢀 λ Œλ”λ§μ΄ μ μ ˆν•˜κ²Œ κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Comment on lines 60 to 62
{mockUserList.map((user, index) => (
<UserProfileItem key={index} {...user} />
))}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ› οΈ Refactor suggestion

λ°°μ—΄ 인덱슀λ₯Ό key둜 μ‚¬μš©ν•˜λŠ” 것을 κ°œμ„ ν•΄μ•Ό ν•©λ‹ˆλ‹€.

key={index}λ₯Ό μ‚¬μš©ν•˜λ©΄ React의 λ Œλ”λ§ μ΅œμ ν™”μ— λ¬Έμ œκ°€ λ°œμƒν•  수 μžˆμŠ΅λ‹ˆλ‹€. λŒ€μ‹  κ³ μœ ν•œ userIdλ₯Ό μ‚¬μš©ν•˜μ„Έμš”.

-{mockUserList.map((user, index) => (
-  <UserProfileItem key={index} {...user} />
-))}
+{mockUserList.map((user) => (
+  <UserProfileItem key={user.userId} {...user} />
+))}
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{mockUserList.map((user, index) => (
<UserProfileItem key={index} {...user} />
))}
{mockUserList.map((user) => (
<UserProfileItem key={user.userId} {...user} />
))}
πŸ€– Prompt for AI Agents
In src/pages/feed/FollowerListPage.tsx around lines 60 to 62, the map function
uses the array index as the key prop for UserProfileItem, which can cause
rendering inefficiencies. Replace key={index} with a unique identifier from the
user object, such as key={user.userId}, to ensure stable and unique keys for
React's reconciliation process.


const handleFollowerListClick = (e: React.MouseEvent) => {
e.stopPropagation();
navigate(`/feed/followerlist/${userId}`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

🧩 Analysis chain

νŒ”λ‘œμ›Œ 리슀트 λ„€λΉ„κ²Œμ΄μ…˜ κ²½λ‘œκ°€ 잘λͺ»λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

ν˜„μž¬ κ²½λ‘œκ°€ /feed/followerlist인데 λ„€λΉ„κ²Œμ΄μ…˜ κ²½λ‘œμ— userIdκ°€ ν¬ν•¨λ˜μ–΄ μžˆμ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λΌμš°νŒ… μ„€μ •κ³Ό μΌμΉ˜ν•˜μ§€ μ•Šμ„ 수 μžˆμŠ΅λ‹ˆλ‹€.

λΌμš°νŒ… 섀정을 ν™•μΈν•˜μ—¬ μ˜¬λ°”λ₯Έ 경둜 ν˜•μ‹μ„ μ‚¬μš©ν•˜κ³  μžˆλŠ”μ§€ κ²€μ¦ν•˜μ„Έμš”:


🏁 Script executed:

#!/bin/bash
# Description: νŒ”λ‘œμ›Œ 리슀트 κ΄€λ ¨ λΌμš°νŒ… μ„€μ • 확인
# Expected: λΌμš°νŒ… κ²½λ‘œμ™€ λ„€λΉ„κ²Œμ΄μ…˜ 경둜의 μΌμΉ˜μ„± 확인

rg -A 3 -B 3 "followerlist" --type=tsx --type=ts

Length of output: 76


파일 νƒ€μž… 인식 문제둜 이전 검색이 μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€. TS 및 TSX νŒŒμΌμ—μ„œ glob νŒ¨ν„΄μ„ μ‚¬μš©ν•΄ followerlist κ΄€λ ¨ λΌμš°νŒ… 섀정을 μž¬κ²€μƒ‰ν•©λ‹ˆλ‹€.


🏁 Script executed:

#!/bin/bash
# Description: TS/TSX νŒŒμΌμ—μ„œ followerlist λΌμš°νŒ… μ„€μ • 확인
rg -A 3 -B 3 "followerlist" -g "*.ts*" .

Length of output: 2336


νŒ”λ‘œμ›Œ 리슀트 경둜 뢈일치 ν•΄κ²° ν•„μš”
ν˜„μž¬ λΌμš°νŒ… μ„€μ •(src/pages/index.tsx)은 /feed/followerlist만 μ²˜λ¦¬ν•˜λŠ”λ°,
src/components/feed/UserProfileItem.tsxμ—μ„œλŠ” navigate(/feed/followerlist/${userId})둜 IDλ₯Ό λΆ™μ—¬ ν˜ΈμΆœν•˜κ³  μžˆμ–΄ μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

λ‹€μŒ 쀑 ν•˜λ‚˜λ‘œ μˆ˜μ •ν•΄μ£Όμ„Έμš”:

  • 경둜 λ§€κ°œλ³€μˆ˜ν™”
    • src/pages/index.tsxμ—μ„œ
      <Route path="feed/followerlist" … />
      λ₯Ό
      <Route path="feed/followerlist/:userId" element={<FollowerListPage />} />
      둜 λ³€κ²½
  • ID 제거
    • src/components/feed/UserProfileItem.tsx의 ν˜ΈμΆœλΆ€λ₯Ό
  • navigate(/feed/followerlist/${userId});
  • navigate('/feed/followerlist');
    둜 μˆ˜μ •
    
    
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
navigate(`/feed/followerlist/${userId}`);
// Before:
- navigate(`/feed/followerlist/${userId}`);
// After:
+ navigate('/feed/followerlist');
πŸ€– Prompt for AI Agents
In src/components/feed/UserProfileItem.tsx at line 46, the navigate call
includes a userId parameter in the path `/feed/followerlist/${userId}`, but the
routing in src/pages/index.tsx only handles `/feed/followerlist` without
parameters. To fix this, either update the route in src/pages/index.tsx to
accept a userId parameter by changing the path to `feed/followerlist/:userId`
and keep the navigate call as is, or remove the userId from the navigate call in
UserProfileItem.tsx to match the existing route.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
src/components/feed/OtherFeed.tsx (1)

32-32: ν•˜λ“œμ½”λ”©λœ ν”„λ‘œν•„ μƒνƒœλ₯Ό λ™μ μœΌλ‘œ μ²˜λ¦¬ν•˜λŠ” 것을 κ³ λ €ν•΄λ³΄μ„Έμš”.

ν˜„μž¬ showFollowButton={true}와 isFollowed={false}κ°€ ν•˜λ“œμ½”λ”©λ˜μ–΄ μžˆμ–΄ μ‹€μ œ μ‚¬μš©μž 관계 μƒνƒœλ₯Ό λ°˜μ˜ν•˜μ§€ λͺ»ν•©λ‹ˆλ‹€. 이후 API 연동 μ‹œ props둜 λ°›μ•„μ„œ μ²˜λ¦¬ν•˜λŠ” 것이 쒋을 것 κ°™μŠ΅λ‹ˆλ‹€.

-      <Profile showFollowButton={true} isFollowed={false} />
+      <Profile showFollowButton={true} isFollowed={isFollowed} />

그리고 OtherFeed μ»΄ν¬λ„ŒνŠΈμ˜ props에 isFollowed?: boolean을 μΆ”κ°€ν•˜λŠ” 것을 κ³ λ €ν•΄λ³΄μ„Έμš”.

src/pages/feed/OtherFeedPage.tsx (1)

50-54: URL νŒŒλΌλ―Έν„° ν™œμš©μ„ κ³ λ €ν•΄λ³΄μ„Έμš”.

ν˜„μž¬ userId νŒŒλΌλ―Έν„°κ°€ λΌμš°νŒ…μ—μ„œ μ •μ˜λ˜μ—ˆμ§€λ§Œ μ»΄ν¬λ„ŒνŠΈμ—μ„œ μ‚¬μš©λ˜μ§€ μ•Šκ³  μžˆμŠ΅λ‹ˆλ‹€. 이후 API 연동 μ‹œ ν™œμš©ν•  수 μžˆλ„λ‘ useParams 훅을 μ‚¬μš©ν•˜λŠ” 것을 κ³ λ €ν•΄λ³΄μ„Έμš”.

-import { useNavigate } from 'react-router-dom';
+import { useNavigate, useParams } from 'react-router-dom';

const OtherFeedPage = () => {
  const navigate = useNavigate();
+  const { userId } = useParams<{ userId: string }>();
src/components/feed/Profile.tsx (1)

38-39: ν•˜λ“œμ½”λ”©λœ 카운트 값을 λ™μ μœΌλ‘œ μ²˜λ¦¬ν•˜λŠ” 것을 κ³ λ €ν•΄λ³΄μ„Έμš”.

μ£Όμ„μ—μ„œ μ–ΈκΈ‰ν•œ λŒ€λ‘œ μ‹€μ œ ν”Όλ“œ κΈ€ 개수λ₯Ό λ°˜μ˜ν•˜λ„λ‘ props둜 λ°›μ•„μ„œ μ²˜λ¦¬ν•˜λŠ” 것이 μ’‹κ² μŠ΅λ‹ˆλ‹€.

export interface ProfileProps {
  showFollowButton?: boolean;
  isFollowed?: boolean;
+  postCount?: number;
}

-const Profile = ({ showFollowButton, isFollowed }: ProfileProps) => {
+const Profile = ({ showFollowButton, isFollowed, postCount = 0 }: ProfileProps) => {

-        <div className="count">4</div>
+        <div className="count">{postCount}</div>
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between f31af54 and e7a04b0.

πŸ“’ Files selected for processing (7)
  • src/components/feed/FollowList.tsx (2 hunks)
  • src/components/feed/MyFeed.tsx (1 hunks)
  • src/components/feed/OtherFeed.tsx (1 hunks)
  • src/components/feed/Profile.tsx (3 hunks)
  • src/components/feed/TotalFeed.tsx (1 hunks)
  • src/pages/feed/OtherFeedPage.tsx (1 hunks)
  • src/pages/index.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/pages/index.tsx
  • src/components/feed/FollowList.tsx
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/components/feed/OtherFeed.tsx (2)
src/styles/global/global.ts (2)
  • colors (4-53)
  • typography (56-76)
src/types/post.ts (1)
  • FeedListProps (18-22)
src/components/feed/MyFeed.tsx (2)
src/styles/global/global.ts (2)
  • colors (4-53)
  • typography (56-76)
src/types/post.ts (1)
  • FeedListProps (18-22)
src/pages/feed/OtherFeedPage.tsx (1)
src/types/post.ts (1)
  • PostData (1-16)
πŸ”‡ Additional comments (15)
src/components/feed/OtherFeed.tsx (2)

1-6: μ»΄ν¬λ„ŒνŠΈ ꡬ쑰가 잘 μ„€κ³„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

ν•„μš”ν•œ μ˜μ‘΄μ„±λ“€μ΄ 적절히 μž„ν¬νŠΈλ˜μ—ˆκ³ , νƒ€μž… μ •μ˜μ™€ κΈ€λ‘œλ²Œ μŠ€νƒ€μΌμ„ μ˜¬λ°”λ₯΄κ²Œ ν™œμš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.


27-44: 쑰건뢀 λ Œλ”λ§κ³Ό 빈 μƒνƒœ μ²˜λ¦¬κ°€ μ μ ˆν•©λ‹ˆλ‹€.

hasPosts λ³€μˆ˜λ₯Ό μ‚¬μš©ν•œ 쑰건뢀 λ Œλ”λ§μ΄ λͺ…ν™•ν•˜κ³ , 빈 μƒνƒœ λ©”μ‹œμ§€κ°€ λ‹€λ₯Έ ν”Όλ“œ μ»΄ν¬λ„ŒνŠΈλ“€κ³Ό 일관성 있게 μ²˜λ¦¬λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

src/components/feed/TotalFeed.tsx (3)

5-5: μ ˆλŒ€ 경둜 μ‚¬μš©μœΌλ‘œ μž„ν¬νŠΈ 일관성이 κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

@/styles/global/globalκ³Ό 같은 μ ˆλŒ€ 경둜 μ‚¬μš©μœΌλ‘œ μ½”λ“œλ² μ΄μŠ€μ˜ 일관성이 ν–₯μƒλ˜μ—ˆμŠ΅λ‹ˆλ‹€.


13-25: λ‹€λ₯Έ ν”Όλ“œ μ»΄ν¬λ„ŒνŠΈλ“€κ³Ό μΌκ΄€λœ 빈 μƒνƒœ μŠ€νƒ€μΌλ§μž…λ‹ˆλ‹€.

EmptyState μ»΄ν¬λ„ŒνŠΈμ˜ μŠ€νƒ€μΌλ§μ΄ MyFeed와 OtherFeed μ»΄ν¬λ„ŒνŠΈμ™€ μ™„μ „νžˆ μΌμΉ˜ν•˜μ—¬ μΌκ΄€λœ μ‚¬μš©μž κ²½ν—˜μ„ μ œκ³΅ν•©λ‹ˆλ‹€.


28-41: 쑰건뢀 λ Œλ”λ§ 둜직이 κΉ”λ”ν•˜κ²Œ κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

hasPosts λ³€μˆ˜λ₯Ό μ‚¬μš©ν•œ 쑰건뢀 λ Œλ”λ§ νŒ¨ν„΄μ΄ λ‹€λ₯Έ ν”Όλ“œ μ»΄ν¬λ„ŒνŠΈλ“€κ³Ό 일관성 있게 μ μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

src/components/feed/MyFeed.tsx (3)

2-2: Profile μ»΄ν¬λ„ŒνŠΈλ‘œμ˜ λ¦¬νŒ©ν† λ§μ΄ μ μ ˆν•©λ‹ˆλ‹€.

MyProfileμ—μ„œ Profile둜 λ³€κ²½ν•˜μ—¬ μ»΄ν¬λ„ŒνŠΈμ˜ μž¬μ‚¬μš©μ„±μ΄ ν–₯μƒλ˜μ—ˆμŠ΅λ‹ˆλ‹€.


32-32: μ‚¬μš©μž μžμ‹ μ˜ ν”Όλ“œμ— λ§žλŠ” ν”„λ‘œν•„ μ„€μ •μž…λ‹ˆλ‹€.

showFollowButton={false}둜 μ„€μ •ν•˜μ—¬ μ‚¬μš©μž μžμ‹ μ˜ ν”Όλ“œμ—μ„œλŠ” νŒ”λ‘œμš° λ²„νŠΌμ„ ν‘œμ‹œν•˜μ§€ μ•ŠλŠ” 것이 μ μ ˆν•©λ‹ˆλ‹€.


38-40: μ‚¬μš©μž λ§₯락에 λ§žλŠ” 빈 μƒνƒœ λ©”μ‹œμ§€μž…λ‹ˆλ‹€.

"ν”Όλ“œμ— 글을 μž‘μ„±ν•΄ λ³΄μ„Έμš”"λΌλŠ” λ©”μ‹œμ§€κ°€ μ‚¬μš©μž μžμ‹ μ˜ ν”Όλ“œμ— μ ν•©ν•˜λ©°, λ‹€λ₯Έ ν”Όλ“œ μ»΄ν¬λ„ŒνŠΈλ“€κ³Ό μ°¨λ³„ν™”λœ μ‚¬μš©μž κ²½ν—˜μ„ μ œκ³΅ν•©λ‹ˆλ‹€.

src/pages/feed/OtherFeedPage.tsx (3)

1-8: ν•„μš”ν•œ μ˜μ‘΄μ„±λ“€μ΄ 적절히 μž„ν¬νŠΈλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

React Router, μŠ€νƒ€μΌλ§, μ»΄ν¬λ„ŒνŠΈ, νƒ€μž… μ •μ˜ 등이 λͺ¨λ‘ μ˜¬λ°”λ₯΄κ²Œ μž„ν¬νŠΈλ˜μ—ˆμŠ΅λ‹ˆλ‹€.


16-48: λ‹€μ–‘ν•œ μ‹œλ‚˜λ¦¬μ˜€λ₯Ό μ»€λ²„ν•˜λŠ” λͺ¨ν‚Ή λ°μ΄ν„°μž…λ‹ˆλ‹€.

κΈ΄ 제λͺ©, κΈ΄ λ‚΄μš©, λ‹€λ₯Έ 곡개 μ„€μ • λ“± λ‹€μ–‘ν•œ ν…ŒμŠ€νŠΈ μΌ€μ΄μŠ€λ₯Ό ν¬ν•¨ν•˜κ³  μžˆμ–΄ UI ν…ŒμŠ€νŠΈμ— μœ μš©ν•©λ‹ˆλ‹€.


56-65: νŽ˜μ΄μ§€ ꡬ성과 λ„€λΉ„κ²Œμ΄μ…˜μ΄ μ μ ˆν•©λ‹ˆλ‹€.

ν—€λ”μ˜ λ’€λ‘œκ°€κΈ° κΈ°λŠ₯, ν”Όλ“œ μ»΄ν¬λ„ŒνŠΈ μ‚¬μš©, λ„€λΉ„κ²Œμ΄μ…˜ λ°” ꡬ성이 λͺ¨λ‘ μ μ ˆν•˜κ²Œ κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

src/components/feed/Profile.tsx (4)

4-14: λͺ¨ν‚Ή 데이터와 Props μΈν„°νŽ˜μ΄μŠ€κ°€ 잘 μ •μ˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

mockProfile 객체둜 데이터λ₯Ό λΆ„λ¦¬ν•˜κ³  ProfileProps μΈν„°νŽ˜μ΄μŠ€λ‘œ μ»΄ν¬λ„ŒνŠΈ APIλ₯Ό λͺ…ν™•νžˆ μ •μ˜ν•œ 것이 μ’‹μŠ΅λ‹ˆλ‹€.


16-17: ꡬ쑰뢄해 ν• λ‹ΉμœΌλ‘œ μ½”λ“œ 가독성이 ν–₯μƒλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

mockProfileμ—μ„œ ν•„μš”ν•œ 속성듀을 ꡬ쑰뢄해 ν• λ‹ΉμœΌλ‘œ μΆ”μΆœν•˜μ—¬ μ½”λ“œκ°€ 더 κΉ”λ”ν•΄μ‘ŒμŠ΅λ‹ˆλ‹€.


31-33: νŒ”λ‘œμš° λ²„νŠΌμ˜ 쑰건뢀 λ Œλ”λ§μ΄ μ μ ˆν•©λ‹ˆλ‹€.

showFollowButton props에 λ”°λ₯Έ 쑰건뢀 λ Œλ”λ§κ³Ό isFollowed μƒνƒœμ— λ”°λ₯Έ λ²„νŠΌ ν…μŠ€νŠΈ 변경이 잘 κ΅¬ν˜„λ˜μ—ˆμŠ΅λ‹ˆλ‹€.


83-92: CSS λ³€μˆ˜ μ‚¬μš©μœΌλ‘œ μŠ€νƒ€μΌλ§ 일관성이 κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

κΈ€λ‘œλ²Œ CSS λ³€μˆ˜λ₯Ό μ‚¬μš©ν•˜μ—¬ λ””μžμΈ μ‹œμŠ€ν…œκ³Όμ˜ 일관성을 μœ μ§€ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature κΈ°λŠ₯ 개발 🎨 Html&css λ§ˆν¬μ—… & μŠ€νƒ€μΌλ§

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant