각 버튼들 (클릭해서 api 통신해야 하는 것들) 클릭시에 색깔 변경되는 부분 완료했고 state도 변경되도록 배열, 핸들러 로직 짰습니다
state배열은 보통 boolean으로 만들었고, 아이콘바는 어차피 하나씩만 눌리기 때문에 배열로 만들지는 않았어요
체크박스.. 어렵던데요..
탑버튼은 은아한테 받아서 바로 붙이겠습니다 - > 붙였는데 제가 화면이 작아서 깨지는데.. 제대로 한 번만 봐주십쇼!
😡 Trouble Shooting
체크박스 각 섹션 열어서 요소 눌러서 state 변경해주는게, 다른 섹션의 요소 누르자마자 reset 되는 문제가 있었습니다. 알고보니 FilterDropdown.tsx가 필터의 각 섹션을 가리키는 건데, 제가 여기에 handler 함수를 적어서 state를 바꾸다보니 당연히 섹션 하나를 누를 때마다 모든 것이 리셋되고 그 섹션 요소만 들어오는 게 맞더라구요! 서희가 알려줘서 해당 tsx의 상위 컴포넌트인 ProductFilter.tsx 에 state 저장해놓는 set배열과 handler 만들어놓고 하위 컴포넌트로 props 넘겨줘서 변경되는 로직을 사용했습니다.
🔥 Related Issues
🎡 작업 내용
✅ PR Point
😡 Trouble Shooting
👀 스크린
샷 / GIF / 링크
📚 Reference