[fix] 외부지원서 리다이렉트 방식 window.location.href로 변경#1065
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Warning
|
| Cohort / File(s) | 변경 내용 |
|---|---|
외부 URL 열기 처리 frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx |
window.open 대신 DOM 앵커 요소를 생성해 href에 외부 URL 할당, target="_blank" 및 rel="noopener noreferrer" 설정 후 click()으로 네비게이션 수행하도록 수정. 내부 네비게이션 로직은 변경 없음. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~2 minutes
Possibly related issues
- MOA-534: 아이폰에서 외부지원서로 이동되지 않는 문제를 해결한다 — iOS 외부 링크 이동 문제와 직접 관련될 가능성 있음.
- [fix] MOA-534 아이폰에서 외부지원서로 이동되지 않는 문제를 해결한다 #1064 — 동일한 방식(
window.open대체, rel 설정)으로 iOS 외부 링크 동작을 다룸.
Possibly related PRs
- [fix] 지원서 미등록 시 alert 반복 버그 수정 및 외부 링크/지원서 분기 처리 #605 — 동일 파일(
ClubApplyButton.tsx)의 외부 URL 처리 변동과 강한 연관. - [fix] window.open에 noopener,noreferrer 옵션 추가 #822 — 외부 링크 열기 시
noopener,noreferrer적용 관련 변경과 연관.
Suggested labels
🐞 Bug, 💻 FE, 🛠Fix
Suggested reviewers
- lepitaaar
- oesnuj
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목이 변경 사항과 일치합니다. 외부 지원서 리다이렉트 방식 변경이 주요 변경점이며, 제목에 명확히 표시되어 있습니다. |
| Linked Issues check | ✅ Passed | PR 변경 사항이 연결된 이슈 MOA-534의 요구사항을 충족합니다. iOS Safari에서 외부 지원 링크가 작동하도록 window.open() 대신 동적 앵커 요소 방식으로 변경했습니다. |
| Out of Scope Changes check | ✅ Passed | ClubApplyButton.tsx의 외부 링크 리다이렉트 방식 변경만 포함되어 있으며, 모두 MOA-534 이슈 해결과 관련된 범위 내 변경입니다. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
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 @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx`:
- Around line 29-51: The current navigateToApplicationForm opens a new window
after awaiting getApplication, which loses the user-gesture context and fails on
iOS Safari; change the logic so that for ApplicationFormMode.EXTERNAL you
redirect the current tab instead of opening a new window: in
navigateToApplicationForm (and where it checks formDetail?.formMode ===
ApplicationFormMode.EXTERNAL and reads formDetail.externalApplicationUrl) remove
or skip the post-API window.open flow and directly assign window.location.href =
externalApplicationUrl (fallback: only if externalApplicationUrl is falsy do
nothing); this implements the PR-preferred Method 1 and avoids popup-blocking
without reordering the await/getApplication call.
frontend/src/pages/ClubDetailPage/components/ClubApplyButton/ClubApplyButton.tsx
Show resolved
Hide resolved
- window.open() 대신 동적 a 태그 생성 방식으로 변경 - iOS Safari의 비동기 컨텍스트 팝업 차단 문제 해결 - 코드 간소화 (복잡한 fallback 로직 제거)
This reverts commit 595da9b.
- API 호출 전에 미리 빈 창을 열어 사용자 제스처 컨텍스트 유지 - API 응답 후 외부 지원서인 경우 URL 주입 - 내부 지원서이거나 에러 발생 시 열린 창 자동 닫기
This reverts commit 17a31b9.
suhyun113
left a comment
There was a problem hiding this comment.
아이폰 유저가 아니라,,, 이런 문제가 있는지 몰랐네요
찾아보니 사파리는 사용자의 직접적인 클릭 액션 없이 발생하는 window.open 호출을 차단한다고 하네요
빠르게 원인 찾아서 해결해주셔서 아주 좋습니당~
#️⃣연관된 이슈
📝작업 내용
문제
iOS Safari에서 "지원하기" 버튼 클릭 시 외부 지원서 링크로 리다이렉트되지 않는 문제
원인
window.open()을 비동기 함수(async/await) 내에서 호출await getApplication()이후window.open()호출 시점에는 사용자 제스처 컨텍스트가 끊어짐해결
window.open() 대신 window.location.href를 사용하여 현재 탭에서 외부 링크로 이동
중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.