codestates / codestates/BookDam

22.01.10 Dev-Log

Open
#108 0 comments 0 reactions 1 assignee Claimed by @Seunghoya View on GitHub
client seunghoAn
Dominant language
JavaScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### 오늘은 어떻게 프로젝트에 기여했나요?
- History와 Location을 이용해 UserPage에 UserNickName을 Params로 전달해주기
- FeedPage Axios 요청 오류 수정
- FeedPage 리뉴얼

### 오늘의 프로젝트에서 힘든 점은 무엇인가요?

- FeedPage에서 피드의 작성자 팔로우 상태에 따라 팔로우 유저 정보를 상태에 담았는데, 이를 Location으로 전달하는 과정에 에로사항이 많았습니다.

```js
// FeedPage
const getFollowInfo = (el) => {
console.log(el)
setFollowInfo({
id: el.id,
userId: el.userId,
userNickName: el.userNickName,
userImage: el.userImage
})

history.push({
pathname: `/userPage/${followInfo.userNickName}`,
state: {
followInfo: followInfo
}})
}
```

```js
// UserPage
import { useLocation } from "react-router-dom";

const location = useLocation()
const followInfo = location.state.followInfo;
```

문법상의 오류는 없다고 판단되는데 map함수로 리턴한 리스트에서 map의 첫 번째 인자로 건네준 데이터가 의도대로 처리되지 않아서 state에 followInfo를 전달할 수 없었습니다.

### 내일은 프로젝트에 기여하기 위해 무엇을 해야 하나요?

- [ ] 무한스크롤 기능 구현 및 남은 모든 기능적인 에러 해결

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.