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

Hotfix: modify alert modal state to recoil and fix the modal style #112

Merged

Conversation

SKY-PEY
Copy link
Contributor

@SKY-PEY SKY-PEY commented Jan 16, 2024

개요

공용으로 뺀 모달 스타일과 state관리 변경했습니다!

recoil로 바꾼 이유
-> 저는 모달 내용 바꿀 일이 많아서 useState 썼는데 컴포넌트가 다르다보니 전역으로 관리가 필요했습니다.

3줄요약

  1. modalOpen, modalContent 다 recoil로 변경 -> modalOpen은 필수로 recoil 사용
  2. modalOpen, modalContent,+ bottomSlide까지 다 recoil로 관리하는 법은 스크린샷 참고
  3. 사용하는 곳에 따라서 modalContent,bottomSlide는 recoil사용 필요없을 수도 있음
  4. 보너스 ++모달 왼쪽버튼 텍스트 넣을 수 있습니다 이제(동작은 모달 닫기)

주요 내용

1. 모달 state 변경 ->모달 오픈, 모달 컨텐트까지 모두 recoil로 변경

image
image

2. Bottom Slide recoil로 관리하기

저는 모달 오픈 하는 곳과 바텀슬라이드 있는 곳이 달라서 recoil로 관리했어요
같은 컴포넌트에 있으시면 상관없을지도 모릅니다

image
image

  1. 담당 기능 구현(같이 push되어서 작성합니다)
    3-1. 후보 select 기능 추가
    3-2. 상태 별 분기처리
    3-3. 후보 삭제 마크업 완료
  2. 모달 스타일 변경
  3. chakra 파일 구조 변경

7. AlertModal 취소 부분 텍스트 변경

기본 취소니까 텍스트 바뀌는 분들만 넣으세용
image
image

고민한 점, 질문거리

Copy link

vercel bot commented Jan 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
trip-vote-fe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2024 5:03pm

@SKY-PEY SKY-PEY merged commit 38aa02e into dev Jan 17, 2024
3 checks passed
@SKY-PEY SKY-PEY deleted the hotfix-modify-alertModal-state-to-recoil-and-fix-the-modal-style branch January 17, 2024 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants