-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
conflict 낫네유 |
</button> | ||
); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 형태도 가능할 것 같네요..!🙇♂️
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; |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constants
들로 매직스트링들은 관리하는게 좋아보입니당
There was a problem hiding this comment.
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 }>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hook/query
레벨로 이동해야될거같숩니당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
피드백 감사합니다😊 수정해서 반영해두었습니다 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마지막까지 화이팅임니당👏
요구사항
이슈번호: MARA-79
작업내용
테스트 결과 또는 방법