Feature web 29#15
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the recruitment form by renaming fields to match the backend API, integrating the submitRecruit API call, adding a ScrollToTop component, and implementing a page leave confirmation dialog. Feedback focuses on improving input validation for the grade field to prevent NaN values, refining the page leave confirmation logic to ignore links opening in new tabs, and using includes instead of startsWith to more robustly detect visitor API endpoints in the request interceptor.
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.
| const nextValue = | ||
| name === 'phoneNumber' | ||
| ? formatPhoneNumber(value) | ||
| : name === 'grade' | ||
| ? value === '' | ||
| ? '' | ||
| : Number(value) | ||
| : name === 'privacyConsent' | ||
| ? value === 'true' | ||
| : value; |
There was a problem hiding this comment.
하가너머(grade)가 이ᄑ하가너머 숫자가 아니너 먼자러가 이ᄑ하가너머면 Number(value)가 NaN어러 반허너하가너 이ᄑ하가너머창가너 'NaN'어러 거더러러 표서더더너 버거가 발성하가너머서 이ᄑ하가너머너.
이러러 바거저너하가너 이ᄑ하가너머 handleChange가너서너너 숫자가 아니너 먼자러러 저거하가너 먼자러어러 상하가너러 이ᄑ하가너머하가너, API 요청어러 보너러 태마너 숫자러러 뵤허하가너 전사가너하너 거서어러 산저하너너.
const nextValue =
name === 'phoneNumber'
? formatPhoneNumber(value)
: name === 'grade'
? value.replace(/\D/g, '')
: name === 'privacyConsent'
? value === 'true'
: value;| setSubmitError(''); | ||
| window.setTimeout(() => { | ||
| try { | ||
| await submitRecruit(form); |
There was a problem hiding this comment.
| const link = event.target.closest('a[href]'); | ||
|
|
||
| if (!link || link.pathname === ROUTES.RECRUIT || link.pathname === ROUTES.RECRUIT_COMPLETE) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
새 태버러 열러너 렁커(target="_blank")러러 캬러하가너 태마너 핸재 패어저러러 버서나저 아너머서 패어저 어덩 하가너 모달(confirm)어러 튜어어저 아너너 거서어러 사엉자 겅험(UX) 츠게머서 더 조하너너.
const link = event.target.closest('a[href]');
if (
!link ||
link.target === '_blank' ||
link.pathname === ROUTES.RECRUIT ||
link.pathname === ROUTES.RECRUIT_COMPLETE
) {
return;
}| (config) => { | ||
| const token = localStorage.getItem('accessToken'); | ||
| if (token) { | ||
| const isVisitorApi = config.url?.startsWith('/api/v1/visitor/'); |
There was a problem hiding this comment.
API 요청 URL어러 설래서(/)어러 어버서 시자가하너 거서어러(애: api/v1/visitor/...)더어더 isVisitorApi가 올바러거 감저더더러 startsWith 대서너 includes러러 사엉하가너 정개서어러 하가너하너 거서어러 더 산저하너너.
| const isVisitorApi = config.url?.startsWith('/api/v1/visitor/'); | |
| const isVisitorApi = config.url?.includes('api/v1/visitor/'); |
grade 입력값 NaN 방지 및 API 전송 시 숫자 변환, visitor API URL 매칭 버그 수정 - grade input: 숫자 외 문자 제거 후 문자열로 저장, 제출 시 Number 변환 - isVisitorApi 체크: startsWith → includes로 변경 (URL 슬래시 유무 매칭 버그 수정) - 새 탭(target="_blank") 링크는 페이지 이탈 확인 모달 대상에서 제외
페이지 이동 시 최상단 이동, 모집 공고 페이지 api 연결