FollowButton

팔로우/언팔로우 버튼

사용법

<FollowButton
  userId={user.id}
  initialState={{
    followers: user._count.followers,
    isFollowedByUser: false
  }}
/>

Props

PropType
userIdstring
initialStateFollowerInfo

동작

  • 클릭 시 팔로우/언팔로우 API 호출
  • Optimistic Update (즉시 UI 반영)
  • 팔로우 중: "Unfollow" (회색)
  • 미팔로우: "Follow" (검정)