-
Notifications
You must be signed in to change notification settings - Fork 10
[8주차] Team STORIX 김윤성 & 이채연 과제 제출합니다. #11
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
Tutankhannun
wants to merge
27
commits into
CEOS-Developers:main
Choose a base branch
from
Team-STORIX:main
base: main
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
sign up, join page UI
로그아웃까지 완료
… into feature/1-퍼블리싱
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.
배포링크
피그마
구현 방식
===============================
2차 필수 구현 사항
[ POST ] /api/v1/votes
후보 선택 → 제출하기 → useVote().mutate(candidateId)
성공 시 alert 후 결과 페이지로 이동
데모데이: /demoday/step3
파트장: /partleader/step3
API
파트장 후보: [ GET ] /api/v1/votes/part-leader
데모데이 후보: [ GET ] /api/v1/votes/demo-day
구현방식
투표 화면(step2): 현재 UI는 로컬 후보 데이터로 렌더링
결과 화면(step3): API 조회 결과를 우선 사용하고, 없으면 로컬 데이터로 fallback
useQuery로 후보 목록(득표수 포함)을 가져와 득표수 내림차순 정렬 후 결과 UI 표시
(1) axios 레벨: 토큰 첨부 + 401 자동 갱신
(2) 화면 단 에러 처리
프로젝트 구조
src/
├─ app/
│ ├─ login/ page.tsx
│ ├─ signup/ page.tsx
│ ├─ electionSelect/ page.tsx
│ ├─ demoday/
│ │ ├─ step1/ page.tsx
│ │ ├─ step2/ page.tsx, step2Client.tsx
│ │ └─ step3/ page.tsx, step3Client.tsx
│ └─ partleader/
│ ├─ step1/ page.tsx
│ ├─ step2/ page.tsx, Step2Client.tsx
│ └─ step3/ page.tsx, Step3Client.tsx
│
├─ components/
│ ├─ box/ (LargeBox, MiddleBox, SmallBox, ResultBox)
│ ├─ button/ Button.tsx
│ └─ common/ LogoutModal.tsx
│
├─ data/
│ ├─ demodayCandidates.ts
│ └─ partleaderCandidates.ts
│
├─ features/
│ ├─ auth/
│ │ ├─ api/auth.repository.ts
│ │ ├─ hooks/use-auth.ts
│ │ ├─ schemas/auth.schema.ts
│ │ └─ stores/auth-store.ts
│ └─ vote/
│ ├─ api/vote.repository.ts
│ ├─ hooks/use-vote.ts
│ └─ schemas/vote.schema.ts
│
├─ lib/
│ ├─ axios.ts
│ └─ react-query.tsx
│
└─ styles/globals.css
느낀점
👨🚀 김윤성
👩🚀 이채연