INtiful / SootheWithMe

같이 달램
https://soothe-with-me.vercel.app/
0 stars 0 forks source link

refactor : Card 컴포넌트 리팩토링 #79

Closed yunchaeney closed 1 week ago

yunchaeney commented 1 week ago

✏️ 작업 내용

📷 스크린샷

컴포넌트 외관상 기존과 변경된 바 없습니다 image

✍️ 사용법

기본 : 이미지와 모임 정보만 출력, handleSaveDiscard 이벤트 핸들러 전달 필수

<Card handleSaveDiscard={handleSaveDiscard} data={DATA_LIST[0]}>
  <Card.Info />
</Card>

chip 출력 시 Card.Info 위에 Card.Chips 컴포넌트 추가

<Card handleSaveDiscard={handleSaveDiscard} data={DATA_LIST[0]}>
  <Card.Chips />
  <Card.Info />
</Card>

버튼 출력 시 Card.Info 밑에 Card.Button 컴포넌트 추가 및 버튼 클릭 이벤트 핸들러 전달

<Card handleSaveDiscard={handleSaveDiscard} data={DATA_LIST[0]}>
  <Card.Chips />
  <Card.Info />
  <Card.Button
    handleButtonClick={
      DATA_LIST[0].isCompleted
        ? handleWriteReview
        : handleCancelGatherings
    }
  />
</Card>

🎸 기타

Test

close #78

yunchaeney commented 1 week ago

현재 CI / Build 과정에서 발생한 에러 해결 중에 있습니당

yunsung-hodoopapa commented 5 days ago

컨텍스트를 사용해주신 것을 잘 보았습니다 :-) 만일 클라이언트 전역 상태관리 라이브러리를 고려하고 있다면 zustand를 사용해보아도 좋습니다 :-)