-
Notifications
You must be signed in to change notification settings - Fork 15
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
[7주차] Team CakeWay 김류원 & 지민재 미션 제출합니다. #5
Open
mimizae
wants to merge
69
commits into
CEOS-Developers:master
Choose a base branch
from
cake-way: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.
+11,796
−5
Open
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
5dbeae1
Initialize Next.js project
mimizae e23636c
feat : 파트장, 데모데이 투표 및 투표결과 페이지 ui
ryu-won f65de22
feat : 돌아가기 기능구현
ryu-won 1503805
feat : 투표결과 기능구현
ryu-won ff1c360
Feat: Login 페이지 1차 퍼블리싱
mimizae 3a6aede
dev merger
mimizae 033984b
Feat: 회원가입, 로그인, 헤더 퍼블리싱
mimizae 03aa06a
Merge pull request #1 from cake-way/mimizae
mimizae d1c474c
Feat: 모든 페이지에 반응형 적용
mimizae f403f21
Merge pull request #2 from cake-way/mimizae
mimizae cf9b887
design : 반응형 수정
ryu-won b7710d0
feat : lib/api.tsx구현
ryu-won dfb431a
feat : api/route.tsx 코드 작성중
ryu-won 4ecfc6a
feat :투표 기능
ryu-won 1402429
유효성 검사를 함수화해서 lib 폴더로 이동, signup 페이지의 요소들을 컴포넌트화, api 요청 함수 생성
mimizae 3a19928
Merge pull request #3 from cake-way/mimizae
mimizae b941675
Merge branch 'ryuwon'
ryu-won 9e88cdb
feat : 머지 후 lib/api 투표관련 함수작성
ryu-won 3228afe
fix : api 연결 오류 해결
ryu-won ce9cda2
Chore: 미디어 쿼리 수정
mimizae 1821a21
Merge branch 'master' of https://github.com/cake-way/next-vote-20th i…
mimizae 9c6b3a2
Feat: login, signup api 연동 1차
mimizae 2ccb806
Fix: hydration mismatch 해결하기
mimizae 94b1e9e
Fix: api 403 에러 해결 중...
mimizae 54d2cce
Fix: login 403 에러 해결 중
mimizae 110ded1
Feat: 로그인, 회원가입 api 연동
mimizae e157720
Merge pull request #4 from cake-way/mimizae
mimizae 9f470b2
Fix: 로컬스토리지에 토큰 저장
mimizae a7d1e67
Fix: 로컬에 토큰 저장 안 되는 에러 해결
mimizae 97b024a
Merge branch 'master' of https://github.com/cake-way/next-vote-20th i…
mimizae a2ea752
Merge pull request #5 from cake-way/mimizae
mimizae ef35e2f
Merge branch 'master' of https://github.com/cake-way/next-vote-20th i…
mimizae acf7a7d
Feat: 파비콘 설정, 로그인 시 아이디 및 비밀번호 입력 안 된 경우 처리
mimizae 12603f3
feat : api/results/ api 연결중
ryu-won 5f5a5c8
feat : 투표결과 조회, 로그인 전 투표, 조회 불가
ryu-won dd7d080
feat : 후보자 목록 api 연결
ryu-won 56bd86b
feat: 후보자 조회api 연결
ryu-won fe4a1fb
Fix: 새로고침 시 로그인 상태 초기화 되는 버그 해결
mimizae 259f4da
feat : 투표하기 api 연결
ryu-won e0eaa8c
fix : 득표수 증가 오류 수정중....
ryu-won a0413a8
design: 후보자 목록 패딩값 조절
ryu-won 442c237
fix: FE파트장 투표 오류 수정
ryu-won 0133854
fix : 백엔드 투표, 팀투표 오류 수정
ryu-won 97792f0
Refact: 상태 통합 및 props 객체를 이용해 스프레드 연산자 사용하는 방식으로 리팩토링
mimizae e60cbfe
fix : team 투표 오류 수정
ryu-won e51c687
fix : 투표하기 삼항연산자 템플릿리터럴 삭제
ryu-won 9f26c1b
fix: 빌드 오류 수정
ryu-won cdb6c24
fix : build 오류 수정
ryu-won 4fa9c5d
Merge: master 병합 충돌 해결
mimizae 30a2168
fix : 빌드오류 수정
ryu-won b0b5766
Merge: master와 머지
mimizae 6f812f7
fix : 빌드오류 수정
ryu-won 70bafbd
Feat: Loading 컴포넌트 구현
mimizae 9fcf404
master와 merge
mimizae 106487b
fix : 13버전 변경 및 빌드 오류 수정
ryu-won e17f3b1
Fix: next 버전 수정
mimizae 6777770
Merge pull request #6 from cake-way/mimizae
mimizae e5076ba
Merge remote-tracking branch 'origin' into ryuwon
ryu-won 585449e
merge
ryu-won f21b34a
Feat: 에러 핸들 유틸 함수 생성
mimizae e439715
mimizae
mimizae 2a1e60a
feat : 투표 한번만 가능하게
ryu-won f43dba0
feat : 로그아웃시 메인으로 이동
ryu-won 64ae00a
Merge branch 'master' of https://github.com/cake-way/next-vote-20th i…
mimizae dbd7641
Merge pull request #7 from cake-way/mimizae
mimizae f79020e
Chore: 로컬 스토리지 clear가 아닌 token만 remove
mimizae 4bbe887
Merge pull request #8 from cake-way/mimizae
mimizae 23e1967
feat : 로컬스토리지 로그인 정보 접근 오류 수정
ryu-won 44df2e0
fix: 팝업오류 수정
ryu-won 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
feat: 후보자 조회api 연결
commit 56bd86b236b8e1a2ba5022cf88b07efd33161320
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
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,39 @@ | ||
import { BACKEND_URL } from "@/app/constants/common"; | ||
import { NextResponse } from "next/server"; | ||
|
||
export async function GET( | ||
req: Request, | ||
{ params }: { params: { part: string } } | ||
) { | ||
const { part } = await params; | ||
|
||
const { headers } = req; | ||
const token = headers.get("Authorization"); | ||
|
||
try { | ||
if (!token) { | ||
console.error("Authorization header is missing"); | ||
return NextResponse.json( | ||
{ error: "Unauthorized: No token provided" }, | ||
{ status: 401 } | ||
); | ||
} | ||
const url = `${BACKEND_URL}/${part === "team" ? "" : "leader/"}${part}`; | ||
console.log(url); | ||
const response = await fetch(url, { | ||
headers: { Authorization: token }, | ||
}); | ||
// 백엔드 응답을 JSON으로 파싱! | ||
const data = await response.json(); | ||
|
||
console.log(response); | ||
return NextResponse.json({ success: true, data: data }); | ||
} catch (error) { | ||
console.log(error); | ||
return NextResponse.json( | ||
{ error: "Internal server error" }, | ||
{ status: 500 } | ||
); | ||
} | ||
} | ||
//try catch문으로 변경 |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 부분 파일들만 route.tsx로 해주신 이유가 있는지 궁금합니다! |
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
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
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
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,3 +1,5 @@ | ||
"use client"; | ||
|
||
export const getPartUrlName = (part: string) => { | ||
switch (part) { | ||
case "FE": | ||
|
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.
이렇게 동적라우트쓰니까 간편한것같아요~