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

[Fix/#88] IconButton 컴포넌트 수정 #90

Merged
merged 3 commits into from
Jan 15, 2025
Merged

Conversation

thisishwarang
Copy link
Collaborator

📌 관련 이슈번호


체크리스트

  • 🎋 base 브랜치를 develop 브랜치로 설정했나요?
  • 🖌️ PR 제목은 형식에 맞게 잘 작성했나요?
  • 🏗️ 빌드는 성공했나요? (yarn build)
  • 🧹 불필요한 코드는 제거했나요? e.g. console.log
  • 🙇‍♂️ 리뷰어를 지정했나요?
  • 🏷️ 라벨은 등록했나요?

✅ Key Changes

이번 PR에서 작업한 내용을 간략히 설명해주세요

  1. IconButton 컴포넌트 내부로 click이벤트 handle함수 이동
  • 기존의 IconButton은 onClick을 prop으로 받고 내부에서는 따로 handle함수를 정의하지 않아서 항상 호출하는 상위 컴포넌트에서 handle함수를 만들어서 넘겨줬어야 했습니다.
  • IconButton의 onClick기능은 찜 on/off, 좋아요 on/off 를 다루는 api 요청밖에 없기 때문에 이를 IconButton 컴포넌트 내부로 이동시켰습니다.
  1. DesignCard, StoreCard도 그에 따라 클릭 이벤트 위치 수정

📢 To Reviewers


📸 스크린샷 or 실행영상

Copy link
Collaborator

@youtheyeon youtheyeon left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

}: IconButtonProps) => {
const handleButtonClick = (e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
console.log('iconClick', itemId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

콘솔 지워주세요!

@@ -38,8 +38,12 @@ const StoreCard = ({ storeItem, onClick }: StoreCardProps) => {
? `${storeName.slice(0, MAX_STORE_NAME_LENGTH)}..`
: storeName;

const handleCardClick = () => {
console.log('스토어카드 클릭', storeId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기도 지워주세요:)

Copy link
Collaborator

@youtheyeon youtheyeon left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

Copy link
Collaborator

@zzz-myam zzz-myam left a comment

Choose a reason for hiding this comment

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

세심하게 더 나은 방향으로 수정하느라 고생많으셨습니당 :)

@thisishwarang thisishwarang merged commit 6ba3b56 into develop Jan 15, 2025
3 checks passed
@thisishwarang thisishwarang deleted the fix/#88/IconButton branch January 15, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] IconButton 컴포넌트 수정
3 participants