Repository navigation
fix: 마케팅 동의 여부 선택으로 변경 및 데드파일 삭제 - #500
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe terms normalization logic no longer requires third-party provision terms for agreement gating. The legacy signup terms component and its stylesheet were also removed. ChangesTerms agreement flow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request removes the unused SignupTerms component and its associated CSS module, and updates the useTermsAgreement hook to treat THIRD_PARTY_PROVISION terms as optional. The reviewer noted that the normalization logic currently overrides all other terms to be required, which could cause issues if the backend introduces new optional terms in the future. A suggestion was provided to preserve the original required status.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| terms.map((term) => ({ | ||
| ...term, | ||
| required: term.termsType !== "MARKETING", | ||
| required: term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION", |
There was a problem hiding this comment.
현재 구현된 normalizeTermsRequirement 로직은 termsType이 "MARKETING"이나 "THIRD_PARTY_PROVISION"이 아닌 모든 약관의 required 속성을 강제로 true로 설정하게 됩니다.
이로 인해 향후 백엔드에서 새로운 선택 약관(예: required: false)을 추가하더라도, 프론트엔드에서는 해당 약관을 필수 약관(required: true)으로 잘못 처리하는 버그가 발생할 수 있습니다.
따라서 기존 백엔드에서 전달된 term.required 상태를 보존하면서, 특정 타입만 선택 약관(false)으로 예외 처리하도록 수정하는 것이 안전합니다.
| required: term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION", | |
| required: term.required && term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION", |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts (1)
9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueChange looks correct —
THIRD_PARTY_PROVISIONis now optional.The
THIRD_PARTY_DATAcontent explicitly states "본 동의는 선택 사항이며, 동의하지 않더라도 서비스 이용에는 제한이 없습니다," so excluding it from required gating is the right call. The downstreamisButtonEnabledfilter (line 78) correctly picks up the overriddenrequiredvalue, andTermsDetailModalstill renders the term details.As a minor maintainability note: as more optional term types are added, the chained
!==conditions will grow. Consider an array-based exclusion:♻️ Optional refactor
-const normalizeTermsRequirement = (terms: Term[]) => - terms.map((term) => ({ - ...term, - required: term.termsType !== "MARKETING" && term.termsType !== "THIRD_PARTY_PROVISION", - })); +const OPTIONAL_TERM_TYPES = new Set(["MARKETING", "THIRD_PARTY_PROVISION"]); + +const normalizeTermsRequirement = (terms: Term[]) => + terms.map((term) => ({ + ...term, + required: !OPTIONAL_TERM_TYPES.has(term.termsType), + }));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts` at line 9, Keep the current behavior that marks both MARKETING and THIRD_PARTY_PROVISION terms as optional, while preserving downstream isButtonEnabled filtering and TermsDetailModal rendering. Refactor the required expression in the term mapping to use a centralized collection of optional term types with an inclusion check, so future optional types can be added without extending chained comparisons.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.ts`:
- Line 9: Keep the current behavior that marks both MARKETING and
THIRD_PARTY_PROVISION terms as optional, while preserving downstream
isButtonEnabled filtering and TermsDetailModal rendering. Refactor the required
expression in the term mapping to use a centralized collection of optional term
types with an inclusion check, so future optional types can be added without
extending chained comparisons.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a6416a92-b2d2-43a9-91de-eca9717dad2f
📒 Files selected for processing (3)
src/components/base-ui/Join/steps/TermsAgreement/useTermsAgreement.tssrc/components/base-ui/Signup/SignupTerms.module.csssrc/components/base-ui/Signup/SignupTerms.tsx
💤 Files with no reviewable changes (2)
- src/components/base-ui/Signup/SignupTerms.tsx
- src/components/base-ui/Signup/SignupTerms.module.css
📌 개요 (Summary)
/signup/terms)에서 "개인정보 제3자 제공 동의" 항목이 필수로 처리되던 문제를 (선택) 항목으로 변경하여 의도에 맞게 수정했습니다.🛠️ 변경 사항 (Changes)
useTermsAgreement.ts내 약관 데이터 정규화 로직(normalizeTermsRequirement) 수정"THIRD_PARTY_PROVISION"타입 약관의required속성을false로 예외 처리src/components/base-ui/Signup디렉토리 통째로 삭제 (SignupTerms.tsx,SignupTerms.module.css제거)📸 스크린샷 (Screenshots)
(여기에 "개인정보 제3자 제공 동의 (선택)" 으로 텍스트가 정상적으로 변경된 약관 동의 화면 캡처 이미지를 첨부해주세요)
✅ 체크리스트 (Checklist)
pnpm build/npm run build확인 완료)pnpm lint)Summary by CodeRabbit
Bug Fixes
Changes