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

팀 상세 페이지 #66

Merged
merged 25 commits into from
Jan 14, 2022
Merged

팀 상세 페이지 #66

merged 25 commits into from
Jan 14, 2022

Conversation

100Gyeon
Copy link
Member

⛓ Related Issues

📋 작업 내용

  • 화면 상단 팀 프로필 부분(사진, 이름, 팀 소개, 멤버 수, 이름) 구조화 및 스타일링
  • 이슈 추가 버튼 : 버튼 스타일 상수 사용, 이슈 등록 페이지로 이동
  • 팀 수정 버튼 : 팀 등록 페이지로 이동
  • 체크박스 누르면 색깔 변경
  • 이슈 카드 리스트 컴포넌트 재사용
  • mock data 사용

📌 PR Point

  • 이슈 등록 페이지로 이동하는 코드를 짜는 과정에서 TeamRouter를 변경했습니다.

👀 스크린샷 / GIF / 링크

https://naegasogaeseo-dev.kro.kr/team/0

https://naegasogaeseo-dev.kro.kr/team/1

@100Gyeon 100Gyeon added feature 🎄 기능 개발 layout 🍃 레이아웃 개발 labels Jan 13, 2022
@100Gyeon 100Gyeon self-assigned this Jan 13, 2022
@100Gyeon 100Gyeon added this to In progress in 팀원소개서 via automation Jan 13, 2022
@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

Copy link
Member

@SeojinSeojin SeojinSeojin left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~!!!
목데이터도 넘 잘 입히고 UI도 진짜 세세하구만~!!~~

리뷰 받은 부분만 조금 손보면 될듯해요~!~

})();
}, []);

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

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

이걸 18~27번째 줄에 있는 useEffect 안에 같이 넣어주어도 될 것 같아요!!

Copy link
Member Author

Choose a reason for hiding this comment

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

좋아좋아 !!

Comment on lines 54 to 59
const names = members?.map((member, index) => (
<span key={member.memberID}>
{member.memberName}
{index < members.length - 1 ? ',\u00a0' : ''}
</span>
));
Copy link
Member

Choose a reason for hiding this comment

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

바로 컴포넌트 안에다가 해도 괜찮을 것 같아!!

return 위에 있는 친구들은 진짜 많이 호출되는데
이 부분에 console.log 찍어보면 진짜 많이 로그 찍힐거야!!

얘네는 members라는 값에만 의존하고 있는데,(===members라는 값에 따라서 변화가 있으면 되는데)
return 위에다가 쓰면은 오만가지 state변화에 다시 다 리렌더링이 될거야..!!

로그 찍히는 만큼 얘네가 계속 호출되는 건데 이 친구들이 그렇게 많이 호출되어야 하는 애들이 아니니까
바로 컴포넌트 안에 넣어줘야 좋을 것 같아!

Copy link
Member Author

Choose a reason for hiding this comment

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

서진아 디코 한번 확인해줘 ~!

useEffect(() => {
(async () => {
setIsValidating(true);
const infoData = await api.teamService.getTeamInfo(teamID);
Copy link
Member

Choose a reason for hiding this comment

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

const { teamInfoData } = await api.teamService.getTeamInfo(teamID);

이렇게 받아서 뎁쓰를 한방 줄이는건 어떨까?
굳이 teamInfoData.teamInfoData로 두 번 들어가야 할 필요는 없을 것 같아..!!

Copy link
Member Author

Choose a reason for hiding this comment

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

안 그래도 이거 거슬렸는데 넘 좋다 !!

Comment on lines 52 to 53
const team = teamInfoData?.teamInfoData[Number(teamID)];
const members = teamInfoData?.teamInfoData[Number(teamID)].teamMembers;
Copy link
Member

Choose a reason for hiding this comment

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

  1. 이 친구들도 컴포넌트 안에서 선언되는게 좋을 것 같아!!
  2. Number(teamID) 대신 +teamID로 쓸 수도 있다!

{isValidating && <div>로딩중</div>}
{team && (
<StTeamInfo>
{team.teamImage ? <img src={team.teamImage} /> : <img src={imgEmptyProfile} />}
Copy link
Member

Choose a reason for hiding this comment

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

예외처리 아주 조하~~~

<img src={team.teamImage ?? imgEmptyProfile} />

이렇게 src 안에서 예외처리하고 ??이라는 친구를 써보아도 좋을 것 같아!!

Copy link
Member Author

Choose a reason for hiding this comment

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

src 안에서 예외 처리 하는 게 더 좋겠다 ✔

}

h3 {
${FONT_STYLES.R_13_TITLE};
Copy link
Member

Choose a reason for hiding this comment

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

꼼꼼하게 잘 적용하고 있구만~~ 굿굿!!!!

Copy link
Member Author

Choose a reason for hiding this comment

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

저렇게 쓰니까 아주 편해 😘

Copy link
Member

@NamJwong NamJwong left a comment

Choose a reason for hiding this comment

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

지연이 고생해쏘💟

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@Hyoin-Kim
Copy link
Member

고생많았어 지연이~~~~~~~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

Copy link
Member

@SeojinSeojin SeojinSeojin left a comment

Choose a reason for hiding this comment

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

진짜 수고많았오...

방금 리뷰 단 부분 반영하고 싶음 해주어~

Comment on lines +13 to +15
getMyIssue(): Promise<TeamIssueData>;
getTeamIssue(teamID: string): Promise<TeamIssueData>;
getTeamInfo(teamID: string): Promise<TeamInfoData>;
Copy link
Member

Choose a reason for hiding this comment

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

넘 수고해쏘....

</button>
<StCheckWrapper>
<button onClick={findMyIssue}>
{isChecked ? <img src={icCoralCheck} /> : <img src={icGrayCheck} />}
Copy link
Member

Choose a reason for hiding this comment

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

이 친구도 src 안에서 삼항연산자 해도 괜찮을듯해!!

Copy link
Member Author

Choose a reason for hiding this comment

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

좋아좋아 같이 바꿔야겠다 !! 👍🏻

@SeojinSeojin
Copy link
Member

울 웹쁜이 고생많았어 ! 여기서 미리보기로 보면서 쉬어~ 다른 웹쁜이들한테도 자랑해줘~

@100Gyeon 100Gyeon merged commit 828968f into dev Jan 14, 2022
팀원소개서 automation moved this from In progress to Done Jan 14, 2022
@100Gyeon 100Gyeon deleted the feat/#52 branch January 14, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎄 기능 개발 layout 🍃 레이아웃 개발
Projects
웹 칸반 보드
Awaiting triage
Development

Successfully merging this pull request may close these issues.

팀 상세 페이지
4 participants