refactor(useNoticeModal): 만료 시점 관리를 위한 expireDate 추가#393
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the notice modal logic by introducing a NOTICE_CONFIG object and an expiration check. The review feedback suggests optimizing performance by parsing the expiration date string into a Date object once at the module level to avoid redundant calculations within the hook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💻 개요
📋 변경 및 추가 사항
기존
useNoticeModal은 공지가 없는 상태를 표현하는 코드가 없었어요CURRENT_ID를 빈 문자열로 두는지 null로 바꾸는지 판단할 수가 X공지 내릴 때마다 코드 수정하려면 귀찮으니까. 만료 시점을 추가했습니다
기존
CURRENT_ID를 포함하는 객체를 만들었습니다useNoticeModal에서 만료 시점이 지난 공지는 노출하지 않게 했습니다원래 뜨던 폭탄 공지는 2025-07-17로 만료일을 설정해서 이제 안 뜨게 됐습니다
2026-04-06.5.20.03.mov
💬 To. 리뷰어