Skip to content

Conversation

@layout-SY
Copy link
Collaborator

구현내용

  • alert에서 공용 모달로 변경
  • 공용 모달에 적용되는 ref를 기존 공용 ref로 변경
  • 모달로 변경하며 각 컴포넌트 mutate 훅 추가
  • 상세 공고 페이지에 로딩 스피너 추가

연관이슈

close #148

@layout-SY layout-SY added the 🛠개선 성능 개선/리팩토링에 대한 라벨 label Feb 1, 2025
@layout-SY layout-SY self-assigned this Feb 1, 2025
@layout-SY layout-SY merged commit 236973e into develop Feb 1, 2025
2 checks passed
@layout-SY layout-SY deleted the feat/#148 branch February 1, 2025 13:12

const Modal = ({ children, isOpen, onClose }: ModalProps) => {
const modalRef = useRef<HTMLDivElement | null>(null);
const modalRefs = useOutsideClick(() => handleClose());
Copy link
Collaborator

Choose a reason for hiding this comment

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

useOutsideClick을 활용해서 로직이 더 간결해 졌네요! 감사합니다~

Comment on lines +164 to +166
<Modal isOpen={isOpen} onClose={handleModalClose}>
{message}
</Modal>
Copy link
Collaborator

Choose a reason for hiding this comment

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

다양한 디자인의 Modal을 쓰는 게 아니라면, 전역 상태관리를 통해서 하나의 Modal에 message를 바꾸는 방식으로 간소화시켜보는 방법도 있겠네요 👀

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.

"생성하기", "참여하기", "상세 공고 페이지", "공고 수정하기" 페이지 미디어쿼리 적용

5 participants