-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FE] feat : 회원용 리뷰 그룹 생성 API 연결 및 관련 목서버 셋팅 수정 #1072
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
de753af
feat : 회원용 리뷰 리뷰 생성 폼 API 연결
BadaHertz52 e1bb55c
feat : ReviewLinkDashboard 리뷰 링크 생성 폼 - 회원용으로 변경
BadaHertz52 374c27f
refactor : gettingPath 함수로 회원 전용 여부를 path에 표시
BadaHertz52 fdadd37
refactor : 회원 전용 페이지의 Amplitude용 페이지 이름 변경
BadaHertz52 27aec28
Merge branch 'fe/refactor/1069-logged-in-path' into fe/feat/1068-logg…
BadaHertz52 7c780b7
refactor : route path 만드는 함수명 변경
BadaHertz52 237139b
Merge branch 'fe/refactor/1069-logged-in-path' into fe/feat/1068-logg…
BadaHertz52 a4ade66
fix : groupAccessCode에 따른 reviewRequestCode 요청 body 변경 오류 수정
BadaHertz52 720b134
feat : 목킹 핸들러에서 request.body를 분석하는 유틸 함수 구현
BadaHertz52 99878dc
feat : reviewRequestCode 요청 목킹 핸들러에서 회원용 reviewRequsetCode 반환
BadaHertz52 0d4eec6
test : 회원용 reviewRequestCode 테스트 추가
BadaHertz52 b9978ac
refactor: DataForReviewRequestCode 위치 변경
BadaHertz52 ebf9de8
refactor : 반복되는 usePostDataForReviewRequestCode 테스트 코드 추상화
BadaHertz52 11178c5
refactoor : 목서버 유효한 리뷰 요청 코드 변수 추상화
BadaHertz52 3475641
Merge remote-tracking branch 'origin' into fe/feat/1068-loggined-revi…
BadaHertz52 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
2 changes: 1 addition & 1 deletion
2
frontend/src/components/reviewURL/URLGeneratorForm/components/URLGeneratorButton/index.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
3 changes: 2 additions & 1 deletion
3
.../src/components/reviewURL/URLGeneratorForm/hooks/usePostDataForReviewRequestCode/index.ts
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,12 +1,13 @@ | ||
// TODO: ROUTE -> ROUTE 및 상수 인덱스에 추가하기 | ||
import { makeRoutePath } from '@/utils'; | ||
|
||
export const ROUTE = { | ||
home: '/', | ||
reviewList: 'user/review-list', | ||
reviewWriting: 'user/review-writing', | ||
reviewWritingComplete: 'user/review-writing-complete', | ||
detailedReview: 'user/detailed-review', | ||
reviewZone: 'user/review-zone', | ||
reviewCollection: 'user/review-collection', | ||
reviewLinks: 'user/review-links', | ||
writtenReview: 'user/written-review', | ||
reviewList: makeRoutePath('review-list'), | ||
reviewWriting: makeRoutePath('review-writing'), | ||
reviewWritingComplete: makeRoutePath('review-writing-complete'), | ||
detailedReview: makeRoutePath('detailed-review'), | ||
reviewZone: makeRoutePath('review-zone'), | ||
reviewCollection: makeRoutePath('review-collection'), | ||
reviewLinks: makeRoutePath('review-links', true), | ||
writtenReview: makeRoutePath('written-review', true), | ||
}; |
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { DefaultBodyType, StrictRequest } from 'msw'; | ||
|
||
import { API_ERROR_MESSAGE } from '@/constants'; | ||
|
||
/** | ||
* api 요청 body를 탐색해 결과를 반환하는 함수 | ||
* @param request mock handler의 request | ||
* @returns request body가 있다면 경우 body 객체 반환, 그렇지 않을 경우 Error 반환 | ||
*/ | ||
export const getRequestBody = async (request: StrictRequest<DefaultBodyType>) => { | ||
// request body의 존재 검증 | ||
if (!request.body) return new Error(API_ERROR_MESSAGE[400]); | ||
|
||
const rawBody = await request.body.getReader().read(); | ||
const textDecoder = new TextDecoder(); | ||
const bodyText = textDecoder.decode(rawBody.value); | ||
|
||
return JSON.parse(bodyText); | ||
}; |
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,5 @@ | ||
export const makeRoutePath = (pageName: string, isForMember: boolean = false) => { | ||
let basic = 'user'; | ||
if (isForMember) basic += '/logged-in'; | ||
return `${basic}/${pageName}`; | ||
}; |
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.
구분이 더 잘 되는 것 같아서 좋네요👍