feat: 복약 실시간 모니터링 (완료/미완료 표시) - #12
Open
kiho-0 wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
MedicationMonitor.tsx: 화면의 핵심 상태를 관리하고 하위 컴포넌트들을 조립하는 컨트롤러 역할로 단순화했습니다. PillButton.tsx: 개별 복약 버튼의 UI와 클릭 이벤트 로직을 독립시켜 재사용 가능한 컴포넌트로 분리했습니다. medication.ts: PillItem 인터페이스를 별도 타입 파일로 정의하여 데이터 구조의 일관성과 타입 안전성을 확보했습니다. MonitorStyles.ts: 모든 스타일 정의를 별도 파일로 분리하여 컴포넌트 파일의 가독성을 높이고 디자인 시스템을 일원화했습니다. |
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.
PillItem 인터페이스를 통해 복약 상태를 정의하고 관리하였습니다.
useState 훅으로 상태 배열을 생성하여 아침, 점심, 저녁 각각의 복약 현황을 실시간으로 관리합니다.
toggleStatus 함수를 구현하여 버튼 클릭 시 done과 pending 상태가 즉시 토글되도록 로직을 작성하였습니다.
TouchableOpacity의 스타일 배열을 사용하여 복약 완료 시 주황색, 미완료 시 회색으로 시각적 피드백을 제공합니다.