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 연동 #28

Merged
merged 14 commits into from
Feb 23, 2024

Conversation

hyeseon-han
Copy link
Member

@hyeseon-han hyeseon-han commented Feb 22, 2024

요구사항

이슈번호: MARA-79

작업내용

  • 친구 삭제 API 연동, 화면 추가 구현
  • 내 초대 코드 조회 API 연동
  • 친구 추가 API 연동

테스트 결과 또는 방법

  • 친구 목록탭 > 친구 삭제 테스트
  • 친구 추가 탭 > 내 초대코드 조회 확인
  • 친구 추가 탭 > 친구 추가 기능 테스트

@choipureum
Copy link
Member

conflict 낫네유

</button>
);
};

Copy link
Member

Choose a reason for hiding this comment

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

이런 형태도 가능할 것 같네요..!🙇‍♂️

Suggested change
const CheckBox: React.FC<{ active: boolean; onClick: () => void }> = ({
active = false,
onClick,
}) => {
const commonStyle = 'flex justify-center items-center w-20 h-20 rounded-full';
const buttonClassName = `${commonStyle} ${active ? 'bg-primary2' : 'border border-gray5'}`;
return (
<button onClick={onClick} className={buttonClassName}>
<CheckIcon stroke={active ? '기본값 혹은 undefined' : '#9299AA'} />
</button>
);
};
export default CheckBox;

Copy link
Member Author

Choose a reason for hiding this comment

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

분기 파편화 이슈가 생길까봐 고민 했었는데 공유 주신 코드가 훨씬 간결해보이네요 👍🏻
반영해두었습니다☺️ 감사해요!🙇‍♀️

const { showToast } = useToast();
const addFriendship = useAddFriendship({
onSuccess: () => {
showToast('친구 추가가 완료되었습니다.', 'success');
Copy link
Member

Choose a reason for hiding this comment

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

constants들로 매직스트링들은 관리하는게 좋아보입니당

Copy link
Member Author

Choose a reason for hiding this comment

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

수정 완료 했습니다 😌

}
};

const { data: myInviteCode } = useBaseQuery<{ inviteCode: string }>(
Copy link
Member

Choose a reason for hiding this comment

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

hook/query 레벨로 이동해야될거같숩니당

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

@choipureum choipureum left a comment

Choose a reason for hiding this comment

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

마지막까지 화이팅임니당👏

@hyeseon-han hyeseon-han merged commit f588dd2 into main Feb 23, 2024
1 check passed
@hyeseon-han hyeseon-han deleted the MARA-79 branch February 23, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants