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

REV-77/유저 리스트 박스 컴포넌트 #15

Merged
merged 6 commits into from
Oct 31, 2023

Conversation

hayamaster
Copy link
Collaborator

📑 구현 내용

  • UserList 컴포넌트 구현
  • string 타입의 날짜 데이터를 가공하는 convertDate 함수 구현
image

🚧 참고 사항

interface User {
  id: number
  image?: string
  name: string
  updated_at?: string
  responser_count?: number
}

작성자별 응답에서의 user 데이터는 updated_at이 수신자별 응답에서의 user 데이터는 responser_count를 포함하고 있기에 모두 prop으로 넘겨받을 수 있도록 하였습니다.

<div className="text-gray-500">
  {user.updated_at
    ? `답변날짜: ${convertDate(user.updated_at)}`
    : `응답자 수: ${user.responser_count}`}
</div>

user.updated_at 이 있으면 답변 날짜를 없으면 응답자 수를 보여줍니다.


@hayamaster hayamaster added the 기능 새로운 기능을 개발합니다. label Oct 30, 2023
@hayamaster hayamaster self-assigned this Oct 30, 2023
Copy link
Collaborator

@khj0426 khj0426 left a comment

Choose a reason for hiding this comment

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

🥇 고생하셨씁니다

src/components/UserList/index.tsx Show resolved Hide resolved
src/components/UserList/index.tsx Show resolved Hide resolved
src/components/UserList/index.tsx Show resolved Hide resolved
src/components/UserList/index.tsx Show resolved Hide resolved
@hayamaster hayamaster changed the title Rev 77/유저 리스트 박스 컴포넌트 REV-77/유저 리스트 박스 컴포넌트 Oct 31, 2023
@hayamaster hayamaster merged commit 7d97f67 into develop Oct 31, 2023
1 check failed
@hayamaster hayamaster deleted the REV-77/유저-리스트-박스-컴포넌트 branch October 31, 2023 06:48
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.

3 participants