feat: 정책 및 약관 API 연동 - #38
Open
chiyyy wants to merge 3 commits into
Open
Conversation
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.
요약
GET /api/policy), 상세 조회(GET /api/policy/{type}) API 연동PolicyScreen의 목록 탭이 아무 동작도 하지 않던 것을 실제 상세 화면으로 연결updatedAt파싱 실패 시NaN.NaN.NaN노출 방지상세 변경
features/policy도메인 신설 (api/model/ui/utils)policyApi.ts:getPoliciesApi,getPolicyDetailApiusePolicyStore.ts: 목록/상세 상태 관리isLoadingList, type별loadingTypesSet) —useWardLocationStore와 동일 패턴hasListError,errorTypes로 "로딩 중" / "조회 실패" / "정말 없음"을 구분해 화면에서 무한 스피너 없이 에러 안내를 보여줄 수 있게 함PolicyListItem.tsx: 목록 항목 컴포넌트 분리formatPolicyUpdatedAt:updatedAt(ISO) →YYYY.MM.DD포맷터, 파싱 불가능한 값이면 빈 문자열 반환(화면에서 해당 줄 자체를 숨김)features/mypage: 실제 스키마와 맞지 않던 자리표시자PolicyItem/MOCK_POLICIES(제목만 있는 mock 4개) 제거screens/guardian/Policy/PolicyScreen.tsx: mock 배열 대신 스토어 연결, 로딩/빈 목록/조회 실패 상태 UI 추가, 항목 탭 시PolicyDetail로 이동screens/guardian/PolicyDetail/PolicyDetailScreen.tsx(신규): 상세 콘텐츠 표시 화면 —WelfareFacilityDetailScreen과 동일하게 자체 헤더(뒤로가기+제목) 사용, 로딩/조회 실패 상태 UI 포함app/navigation/types.ts,GuardianStackNavigator.tsx:PolicyDetail: { type: PolicyType }라우트 추가/등록참고
useFocusEffect)만으로 둠.env등 민감 파일 변경 없음테스트
tsc --noEmit통과