-
Notifications
You must be signed in to change notification settings - Fork 165
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
[2단계 - 페이먼츠] - 버건디(전태헌) 미션 제출합니다. #371
Merged
Merged
Changes from 24 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
44f4305
chore : 리액트 라우터 돔 설치
brgndyy 12e5705
docs: README.md 작성
brgndyy 14bfb38
chore: 타입 모듈 설정을 위해 tsconfig.json 수정
brgndyy 1007a94
refactor: step1때 구현했던 컴포넌트들 파일로 분리후 새롭게 생성
brgndyy 854bc68
refactor: Input forwardRef 연결
brgndyy 9bbcf05
feat: 공용 버튼 컴포넌트 생성
brgndyy 86aecc8
feat: 분기 렌더링, 카드 이미지 변경 커스텀 훅 생성
brgndyy 127b5a1
feat: 추가되는 등록 컴포넌트 생성
brgndyy c5c7539
chore: tsconfig.json 수정
brgndyy 5be52a4
feat: cvc 컴포넌트 생성
brgndyy b43c38c
refactor: useCardNumber 훅 수정
brgndyy dd79524
refactor: useInput 훅 수정
brgndyy 934a07b
feat: 확인 페이지 작성
brgndyy 19c0c96
feat: 상수 추가 및 타입 경로 수정
brgndyy 499c5ed
feat: 유효성 검사 함수 추가
brgndyy d803c5a
feat: 완료 버튼 렌더링 관련 커스텀 훅 생성
brgndyy 5bcb4d4
feat: 메인 컴포넌트에서 바인딩
brgndyy de53040
feat: 공용 셀렉트 옵션 컴포넌트 생성
brgndyy 5394502
feat: 스토리북 작성
brgndyy d407d18
feat: 404 페이지와 에러페이지 작성
brgndyy 284be3d
refactor: 라우트 상수 처리 및 그외 스타일 수정
brgndyy c4cec96
chore: 스토리북 addon 추가
brgndyy 741bb32
refactor: 상수 경로 수정
brgndyy e2e01e7
refactor: 린트 에러 수정
brgndyy 4ce799e
refactor: useDetectComplete 커스텀 훅 유효성 검사 함수 유틸로 분리
brgndyy ccda0d0
refactor: 타입 설정 폴더 및 파일 변경
brgndyy 6443a52
chore: 경로 alias 적용
brgndyy 919f76c
refactor: 버튼 공용 타입 변경
brgndyy 0b048d5
refactor: 타입 alias 적용
brgndyy 976bcf3
refactor: 카드 관련 스타일 파일 분리
brgndyy a03d0b1
refactor: 카드 관련 상수 파일명 변경
brgndyy 0b86c01
feat: 체크 아이콘 이미지 svg 컴포넌트 생성
brgndyy c9b777d
feat: useExpirationDate 커스텀훅 적용
brgndyy a06770e
refactor: 카드 등록 섹션 컴포넌트명 변경
brgndyy a17df96
fix: 피그마 시안과 같도록 확인페이지 수정
brgndyy 35646fe
refactor: 카드등록 페이지 컴포넌트로 따로 분리
brgndyy ce578f0
refactor: 에러페이지에서 라우팅 경로 메인으로 변경
brgndyy 4f54fb3
refactor: NotFoundPage 상태 수정
brgndyy fef7cc4
chore: type alias 적용
brgndyy 32fe954
feat: 확인 페이지 라우팅 버튼 컴포넌트 생성
brgndyy 7a6c6e0
refactor: App과 main 에서 컴포넌트 분리
brgndyy 8efe68e
refactor: 카드 정보를 담고 있는 상수 이름 수정
brgndyy 760d360
refactor: isValidCurrentStep 상태명 수정
brgndyy 3c4ded7
feat: 월 관련 상수 추가
brgndyy 5e291c9
refactor: InputSection 컴포넌트 폴더 위치 수정
brgndyy bfee2dd
refactor: nextStepHandler onComplete 로 수정
brgndyy 9f28ef1
refactor: useDetectComplete 훅 삭제
brgndyy 82f00ef
refactor: useCardIssuer 훅 수정
brgndyy de5b6f8
refactor: 스토리북 재작성
brgndyy c2dee55
refactor: ref 인자 수정
brgndyy 06e1030
refactor: useCardNumber 훅 수정
brgndyy f1f7ece
refactor: forwardRef 수정
brgndyy c4ea12f
refactor: 타입 추가
brgndyy 002f8c1
fix: 셀렉트 태그 placeholder 추가
brgndyy 8e3398c
refactor: 컨펌페이지 props 수정
brgndyy 4262ed6
refactor: 등록섹션 관련 타입 변경
brgndyy 8e217b2
refactor: index.html lang 속성 변경
brgndyy 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 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 |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
import type { StorybookConfig } from '@storybook/react-vite'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@chromatic-com/storybook", | ||
"@storybook/addon-interactions", | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
'storybook-addon-remix-react-router', | ||
], | ||
framework: { | ||
name: "@storybook/react-vite", | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
autodocs: 'tag', | ||
}, | ||
}; | ||
export default config; |
This file contains 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,35 @@ | ||
declare module 'types' { | ||
export type RegisterStepProps = { | ||
value: string; | ||
onChange: React.ChangeEventHandler<HTMLInputElement>; | ||
isError: boolean; | ||
onEnter: (e: React.KeyboardEvent) => void; | ||
onBlur: React.FocusEventHandler<HTMLInputElement>; | ||
}; | ||
|
||
export type InitialCardNumberState = { | ||
value: string; | ||
isError: boolean; | ||
}; | ||
|
||
export type RegisterStep = | ||
| 'cardNumbers' | ||
| 'cardIssuer' | ||
| 'cardExpirationDate' | ||
| 'cardOwnerName' | ||
| 'cardCvc' | ||
| 'cardPassword'; | ||
|
||
export type RegisterComponentProps = { | ||
step: RegisterStepType; | ||
}; | ||
|
||
export type UseDetectCompleteHookProps = { | ||
cardNumbers: InitialCardNumberState[]; | ||
month: string; | ||
year: string; | ||
cvc: string; | ||
password: string; | ||
name: string; | ||
}; | ||
} |
This file contains 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,25 @@ | ||
# 동적 입력 UI 구현 | ||
|
||
사용자는 카드 번호를 입력할 때 동적으로 제공되는 입력 UI를 통해 집중적으로 하나의 입력 필드에만 집중할 수 있다. | ||
|
||
# 카드사 선택 | ||
|
||
사용자는 카드사를 선택할 수 있고, 카드사에 따라 미리보기 카드의 색상을 변경한다. | ||
|
||
# CVC 번호 | ||
|
||
CVC 번호를 입력할 때는 미리보기 카드의 뒷면을 시각적으로 보여준다. | ||
|
||
입력은 숫자만 가능하며, 유효하지 않은 값을 입력 시 피드백을 제공한다. | ||
|
||
# 폼 제출 및 상태 관리 | ||
|
||
모든 카드 정보가 정확하게 입력되고 검증되었을 때 확인 버튼이 활성화된다. | ||
|
||
사용자가 입력한 정보 중 하나라도 지우거나 수정하여 유효하지 않게 되면, 확인 버튼은 보이지 않는다. | ||
|
||
# 카드 등록 완료 및 네비게이션 | ||
|
||
확인 버튼을 클릭하면 사용자는 카드 등록 완료 페이지로 이동한다. | ||
|
||
카드 등록 완료 페이지에서는 카드 등록이 성공적으로 완료되었다는 메시지와 함께, 다시 카드 등록 페이지로 돌아갈 수 있는 확인 버튼을 제공한다. |
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 타입정의 파일 안에 들어간 타입들은 전역적(global)으로 사용되는 타입은 아닌 것 같은데 버건디의 생각은 어떠신가용~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
맞는 말씀이에요! 전역적으로 사용하는 타입이 아닌데 그냥 루트 경로에 만들어줬다는 이유로 global로 지어주었던거 같습니다 🥲
ts와 vite 내에서 설정해주어서 그냥 path alias를 사용해주는 방향으로 변경했습니다!
짚어주셔서 감사합니다!