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

유저 컴포넌트 구현 #56

Merged
merged 4 commits into from
Nov 7, 2023
Merged

유저 컴포넌트 구현 #56

merged 4 commits into from
Nov 7, 2023

Conversation

eeseung
Copy link
Member

@eeseung eeseung commented Nov 7, 2023

📑 이슈 번호

🚧 구현 내용

유저 컴포넌트를 구현했습니다.

User 컴포넌트

LinkHub-FE_user-component_light LinkHub-FE_user-component_dark

🚨 특이 사항

UserProps

interface UserProps {
  id: number
  name: string
  profile: string
  oneLiner?: string
  isFollow?: boolean // 팔로잉 여부
  isAuth?: boolean // 본인 여부
  onClick?: (id: number, isFollow: boolean) => void // 팔로우 or 언팔로우
}

사용 예시

<User
  id={user.id}
  name={user.name}
  profile={user.profile}
  oneLiner={user.oneLiner}
  isFollow={user.isFollow}
  isAuth={authUser.id === user.id}
  onClick={(id, isFollow) =>
    console.log(isFollow ? `unfollow ${id}` : `follow ${id}`)
  }
  key={user.id}
/>

@eeseung eeseung added the ✨ Feature 기능 개발 label Nov 7, 2023
@eeseung eeseung added this to the 2차 스프린트 milestone Nov 7, 2023
@eeseung eeseung self-assigned this Nov 7, 2023
@eeseung eeseung linked an issue Nov 7, 2023 that may be closed by this pull request
1 task
Copy link
Contributor

@dudwns dudwns left a comment

Choose a reason for hiding this comment

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

LGTM 입니다!! 👍
개발하면서 느낀 건데 useToggle이 정말 다양한 곳에서 유용하게 쓰이는 것 같네요 😄

@eeseung eeseung merged commit 8aa35fe into develop Nov 7, 2023
1 check passed
@eeseung eeseung deleted the feature/#53/component-user branch November 7, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

유저 컴포넌트 구현
2 participants