-
Notifications
You must be signed in to change notification settings - Fork 5
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] issue137: 리뷰 작성 페이지 생성 #184
Conversation
…oamoa into feat/137-review-page
frontend/src/api/getStudyDetail.ts
Outdated
@@ -1,4 +1,4 @@ | |||
import { StudyDetail } from '@custom-types/index'; | |||
import { StudyDetail } from '@custom-types'; |
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.
👍
frontend/src/api/patchReview.ts
Outdated
export const patchReview = async ({ studyId, reviewId, content }: EditReviewQueryData) => { | ||
const response = await axiosInstance.patch<EmptyObject, any, EditReviewQueryData>( |
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.
👍
frontend/src/api/postReview.ts
Outdated
import axiosInstance from '@api/axiosInstance'; | ||
|
||
export const postReview = async ({ studyId, content }: ReviewQueryData) => { | ||
const response = await axiosInstance.post<EmptyObject, any, { content: string }>(`/api/studies/${studyId}/reviews`, { |
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.
회의결과 any대신 AxiosResponse을 넣어주기로 했습니다
@@ -1,17 +1,18 @@ | |||
import { noop } from '@utils/index'; |
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.
얘도 index 없애면 좋을 것 같아요!
import { css } from '@emotion/react'; | ||
import styled from '@emotion/styled'; | ||
|
||
export const KebabMenu = styled.ul` |
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.
이름이 아주 적절하군요 :D
export type StudyId = number; | ||
export type TagId = number; | ||
export type ReviewId = number; | ||
export type MemberId = number; | ||
export type CategoryId = number; |
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.
👍
@@ -89,6 +89,6 @@ export const handlers = [ | |||
}), | |||
...detailStudyHandlers, | |||
...tagHandlers, | |||
...tokenHandlers, |
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.
이거 지우면 로그인 모킹서버가 안 돼요!
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.
복구했습니다!
frontend/src/mocks/tokenHandlers.ts
Outdated
import { rest } from 'msw'; | ||
|
||
export const tokenHandlers = [ | ||
rest.post('/api/login/token', (req, res, ctx) => { | ||
const code = req.url.searchParams.get('code'); | ||
|
||
if (!code) { | ||
return res(ctx.status(400), ctx.json({ message: '잘못된 요청입니다.' })); | ||
} | ||
return res(ctx.status(200), ctx.json({ token: 'asddfasdfassdf' })); | ||
}), | ||
]; |
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.
복구해주세요!!
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.
네!
export type DD = `0${oneToNine}` | `1${d}` | `2${d}` | `3${0 | 1}`; | ||
export type MM = `0${oneToNine}` | `1${0 | 1 | 2}`; | ||
export type YYYY = `20${d}${d}`; | ||
export type DateYMD = `${YYYY}-${MM}-${DD}`; |
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.
👀 👍
frontend/src/mocks/reviewHandler.ts
Outdated
ctx.status(200), | ||
ctx.json({ | ||
reviews: reviewJSON.reviews.slice(0, sizeNum), | ||
totalResults: reviewJSON.reviews.length, |
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.
이거 totalResults -> totalCount로 바꿔주세요!
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
Co-authored-by: TaeYoon <[email protected]>
요약
close #137