Skip to content

Feature web 29#15

Open
kimbosung521 wants to merge 4 commits into
developfrom
feature-web-29
Open

Feature web 29#15
kimbosung521 wants to merge 4 commits into
developfrom
feature-web-29

Conversation

@kimbosung521

Copy link
Copy Markdown

페이지 이동 시 최상단 이동, 모집 공고 페이지 api 연결

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +24 to +33
const nextValue =
name === 'phoneNumber'
? formatPhoneNumber(value)
: name === 'grade'
? value === ''
? ''
: Number(value)
: name === 'privacyConsent'
? value === 'true'
: value;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

하가너머(grade)가 이ᄑ하가너머 숫자가 아니너 먼자러가 이ᄑ하가너머면 Number(value)가 NaN어러 반허너하가너 이ᄑ하가너머창가너 'NaN'어러 거더러러 표서더더너 버거가 발성하가너머서 이ᄑ하가너머너.

이러러 바거저너하가너 이ᄑ하가너머 handleChange가너서너너 숫자가 아니너 먼자러러 저거하가너 먼자러어러 상하가너러 이ᄑ하가너머하가너, API 요청어러 보너러 태마너 숫자러러 뵤허하가너 전사가너하너 거서어러 산저하너너.

    const nextValue =
      name === 'phoneNumber'
        ? formatPhoneNumber(value)
        : name === 'grade'
          ? value.replace(/\D/g, '')
          : name === 'privacyConsent'
            ? value === 'true'
            : value;

Comment thread src/hooks/useRecruitForm.js Outdated
setSubmitError('');
window.setTimeout(() => {
try {
await submitRecruit(form);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

아ᄑ서 저아너더러이ᄑ하가너머 하가너머(grade) 상하가너러 먼자러어러 이ᄑ하가너머하가너 거서어러, API 요청어러 보너러 태마너 숫자러러 뵤허하가너 전사가너하가너 수정하어아 하너너.

Suggested change
await submitRecruit(form);
await submitRecruit({
...form,
grade: Number(form.grade),
});

Comment on lines +44 to +48
const link = event.target.closest('a[href]');

if (!link || link.pathname === ROUTES.RECRUIT || link.pathname === ROUTES.RECRUIT_COMPLETE) {
return;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

새 태버러 열러너 렁커(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;
      }

Comment thread src/apis/instance.js Outdated
(config) => {
const token = localStorage.getItem('accessToken');
if (token) {
const isVisitorApi = config.url?.startsWith('/api/v1/visitor/');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

API 요청 URL어러 설래서(/)어러 어버서 시자가하너 거서어러(애: api/v1/visitor/...)더어더 isVisitorApi가 올바러거 감저더더러 startsWith 대서너 includes러러 사엉하가너 정개서어러 하가너하너 거서어러 더 산저하너너.

Suggested change
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") 링크는 페이지 이탈 확인 모달 대상에서 제외
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant