Skip to content
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: 소식 페이지 헤더중 팔로잉 목록 이동 버튼을 위한 API 추가 #278

Merged
merged 5 commits into from
Aug 29, 2024

Conversation

hjy0951
Copy link
Collaborator

@hjy0951 hjy0951 commented Aug 28, 2024

🤔 어떤 문제가 발생했나요?

  • 헤더 및 아이템들의 프로필 이미지가 정상적으로 나타나지 않아

🎉 어떻게 해결했나요?

  • 소식 페이지 헤더의 팔로잉 목록 이동 버튼에 API를 연결하였습니다.
  • 헤더 및 아이템들의 프로필 이미지가 정상적으로 나타날 수 있도록 필드명을 수정하고 css 속성을 추가하여 적용하였습니다.

📷 이미지 첨부 (Option)

스크린샷 2024-08-29 오전 2 26 44

⚠️ 유의할 점! (Option)

@king2dwellsang king2dwellsang added the Review Plz🙏 # Review is not yet complete label Aug 28, 2024
@hjy0951 hjy0951 changed the title Feat/news following summary button api feat: 소식 페이지 헤더중 팔로잉 목록 이동 버튼을 위한 API 추가 Aug 28, 2024
@hjy0951 hjy0951 added the feat # Add feature label Aug 28, 2024
Copy link
Member

@Jungjjeong Jungjjeong left a comment

Choose a reason for hiding this comment

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

👍

const hasFollowings = followingCount > 0;
const indexOffset = MAX_NUMBER_OF_PROFILES - followings.length;
let nodeList: Array<ReactNode> = [];

if (hasFollowings) {
nodeList = followings.map(({ memberId, profileUrl }, index) => (
nodeList = followings.map(({ memberId, profileImageUrl }, index) => (
Copy link
Member

Choose a reason for hiding this comment

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

followings.map으로도 충분히 반복문을 돌 수 있을 것 같은데 nodeList를 let으로 선언해서 사용하시는 이유가 있을까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

엇 단순히 followings 길이가 1 이상일 경우, map을 이용해 요소들의 배열을 만들어 nodeList에 넣어줘야겠다는 생각으로 작성했던 것 같습니다!

const nodeList = [...followings.map(...)];

혹시 const 선언 이후 위와 같은 방식을 말씀하시려던 걸까요?!

@king2dwellsang king2dwellsang added Approved 🆗 # Review is completed and removed Review Plz🙏 # Review is not yet complete labels Aug 28, 2024
@hjy0951 hjy0951 merged commit 14b7cfd into main Aug 29, 2024
1 of 2 checks passed
@hjy0951 hjy0951 deleted the feat/news-following-summary-button-api branch August 29, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved 🆗 # Review is completed feat # Add feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants