-
Notifications
You must be signed in to change notification settings - Fork 12
[7주차] Team 인플루이 한서정 & 최서연 미션 제출합니다. #6
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
Open
xseojungx
wants to merge
104
commits into
CEOS-Developers:master
Choose a base branch
from
Team-Influy:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
[FEAT] 회원가입 페이지 UI
[FEAT] Home 페이지 UI
[FIX] Vercel Deploy Error
… VoteResult component
…tLayout component
[FEAT] 투표 결과 페이지 구현
… VoteResult component
…tLayout component
[Feat]로그인 인터셉터 제작
[FEAT] 에러 핸들링
[Design] 전반적인 디자인 수정 #18
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
링크
2025-06-29.5.20.38.mov
Zod 스키마가 무엇인지, 어떻게 활용할 수 있는지 알아봅시다.
Zod는 TypeScript 스키마 선언 및 유효성 검증 라이브러리. 이 스키마를 통해 특정 데이터가 우리가 기대한 타입에 맞는지 검사할 수 있음.
TypeScript의 유효성 검증은 컴파일 시에만 발생하고 런타임에는 아무런 역할을 하지 못하지만, zod는 런타임에서 API 인자의 타입을 검증. ⇒ TypeScript와 Zod를 함께 사용하면 타입 안전성을 유지하면서도 외부 데이터의 유효성을 보장할 수 있음.
zod는 자바스크립트의 기본 자료형이나
Date
와 같은 내장 클래스에 대응하는 검증자(validator) 함수를 제공.스키마 생성
z.type
z.coerce.{type} → 타입 강제 변환
값의 type을 number로 변환
자동 타입 추론
에러 메세지 커스터마이징
자료형 데이터 스키마 선언 시 에러 메세지를 지정할 수 있음.
파싱
parse()
: 스키마를 기준으로 데이터의 유효성 확인parseAsync()
: 비동기 정제를 사용하는 경우safeParse()
: 유효성 검사 실패 시에도 오류를 발생시키지 않음safeParseAsync()
(=spa()
): safeParse의 비동기 버전.이번 프로젝트에서 토큰 관리를 어떻게 할 예정인지, 그리고 왜 그런 방법을 선택했는지에 대해 설명해 주세요.
Access Token → 메모리(Zustand) 관리
Refresh Token → Zustand + persist + 암호화(예정) → localstorage 저장