-
Notifications
You must be signed in to change notification settings - Fork 3
[retfactor] 지원서 페이지에 지원서 설명 추가 및 리팩토링 #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
oesnuj
merged 12 commits into
develop-fe
from
feature/#561-application-form-description-MOA-101
Jul 21, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d0611ac
refactor: 수정된 최소 너비를 300px로 변경
oesnuj 9b68981
refactor: 최소 너비를 385px에서 300px로 변경
oesnuj 270e878
refactor: 지원서 페이지 스타일 개선
oesnuj f791496
refactor: QuestionContainer의 패딩 값을 24px에서 26px 15px로 변경
oesnuj e0d3a25
refactor: PageContainer의 paddingTop 값을 172px에서 100px로 변경
oesnuj 9a11f12
refactor: FormTitle 및 QuestionsWrapper 스타일 수정
oesnuj a68347d
feat: 지원서 설명 부분 UI 및 유틸 함수 추가
oesnuj a3b4031
feat: 링크가 포함된 설명을 파싱하는 유틸 함수 추가
oesnuj 05444a0
feat: 지원서 답변 유효성 검사를 위한 validateAnswers 훅 추가
oesnuj 547436b
refactor: media 쿼리를 사용하여 스타일을 개선하고 불필요한 CSS 제거
oesnuj e5a3b23
refactor: 불필요한 코드 제거 및 유효성 검사 로직 개선
oesnuj df44620
fix: 고유 키 생성 방식 개선
oesnuj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { Question } from '@/types/application'; | ||
|
|
||
| export const validateAnswers = ( | ||
| questions: Question[], | ||
| getAnswersById: (id: number) => string[] | ||
| ): number[] => { | ||
| return questions | ||
| .filter(q => q.options.required) | ||
| .filter(q => { | ||
| const answers = getAnswersById(q.id); | ||
| return answers.length === 0 || answers.every(s => s.trim() === ''); | ||
| }) | ||
| .map(q => q.id); | ||
| }; |
30 changes: 24 additions & 6 deletions
30
frontend/src/pages/ApplicationFormPage/ApplicationFormPage.styles.ts
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { Fragment } from 'react'; | ||
|
|
||
| export const parseDescriptionWithLinks = (text: string): React.ReactNode => { | ||
| const urlRegex = /(https?:\/\/[^\s]+)/g; | ||
|
||
|
|
||
| return text.split(urlRegex).map((part, index) => { | ||
| const isUrl = /^https?:\/\/[^\s]+$/.test(part); | ||
| return isUrl ? ( | ||
| <a | ||
| key={`${part}-${index}`} | ||
| href={part} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| style={{ color: '#0077cc', textDecoration: 'underline' }} | ||
oesnuj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| > | ||
| {part} | ||
| </a> | ||
| ) : ( | ||
| <Fragment key={`${part}-${index}`}>{part}</Fragment> | ||
| ); | ||
| }); | ||
| }; | ||
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.
Uh oh!
There was an error while loading. Please reload this page.