[박효빈] sprint10-11#195
Open
hyobiin9 wants to merge 29 commits intocodeit-sprint-fullstack:next-박효빈from
Hidden character warning
The head ref may contain hidden characters: "next-\ubc15\ud6a8\ube48-sprint10-11"
Open
Conversation
MCprotein
reviewed
Dec 25, 2024
| .vercel | ||
|
|
||
| # typescript | ||
| *.tsbuildinfo |
MCprotein
reviewed
Dec 25, 2024
| return response.data; | ||
| } catch (error: any) { | ||
| console.error("Error posting product comment:", error.message || error); | ||
| throw new Error("post product comment failed"); |
There was a problem hiding this comment.
@hyobiin9 만약 클라이언트 에러라면 사용자가 어떤 것을 잘못했는지 알아야될거같은데, 이렇게 고정값을 에러로 내보내도 괜챃을까요?
MCprotein
reviewed
Dec 25, 2024
| const response = await getRequest("/products", { params }); | ||
| return response.data; | ||
| } catch (error) { | ||
| throw new Error("get product failed"); |
There was a problem hiding this comment.
@hyobiin9 이런부분 전부 마찬가지입니다
차라리 잠시후에 다시 시도하라거나, 관리자에게 문의하라는 메세지를 띄우는게 더 나을거같습니다
MCprotein
reviewed
Dec 25, 2024
Comment on lines
+77
to
+81
| images: File[], | ||
| tags: string[], | ||
| price: string, | ||
| description: string, | ||
| name: string |
There was a problem hiding this comment.
@hyobiin9 이런거는 객체를 넘기게 하는게 더 나을거같아요
description이 Null 이고 name 은 null이 아닐수도 있잖아요
MCprotein
reviewed
Dec 25, 2024
Comment on lines
+14
to
+20
| if (isAxiosError(error)) { | ||
| console.error("Axios Error:", { | ||
| message: error.message, | ||
| status: error.response?.status, | ||
| data: error.response?.data, | ||
| }); | ||
| } |
MCprotein
reviewed
Dec 25, 2024
| if (!text.trim()) return; | ||
|
|
||
| try { | ||
| await fetchProductCommentWrite(String(productId), text); |
There was a problem hiding this comment.
@hyobiin9 productId 타입을 변환하느 ㄴ이유가 무엇인가요? 서버와 클라이언트에서 다루는 데이터가 같은데 타입이 다른건가요?
MCprotein
reviewed
Dec 25, 2024
| src={close} | ||
| alt="close" | ||
| onClick={() => | ||
| setTagsArray(tagsArray.filter((_, i) => i !== index)) |
MCprotein
reviewed
Dec 25, 2024
| const [productData, setProductData] = useState<ProductData | null>(null); | ||
| const [bestProductData, setBestProductData] = useState([]); | ||
| const [dropdownOption, setDropdownOption] = useState("recent"); | ||
| const [selectedOption, setSelectedOption] = useState("최신순"); |
There was a problem hiding this comment.
@hyobiin9 useState에 generic 사용가능한거같은데 "최신순" 같이 하드코딩 하는거보다 타입 넣어주는게 어때요?
MCprotein
reviewed
Dec 25, 2024
Comment on lines
+7
to
+30
| export async function getRequest(url: string, params: object = {}) { | ||
| const config: CustomAxiosRequestConfig = params; | ||
| return instance.get(url, config); | ||
| } | ||
|
|
||
| export async function postRequest( | ||
| url: string, | ||
| body: object = {}, | ||
| config?: any | ||
| ) { | ||
| return instance.post(url, body, config); | ||
| } | ||
|
|
||
| export async function patchRequest( | ||
| url: string, | ||
| body: object = {}, | ||
| config?: any | ||
| ) { | ||
| return instance.patch(url, body, config); | ||
| } | ||
|
|
||
| export async function deleteRequest(url: string, config?: any) { | ||
| return instance.delete(url, config); | ||
| } |
There was a problem hiding this comment.
@hyobiin9 인터셉터로 에러핸들링 하는게 좋아보여요
config는 아마 axios에서 제공하는 타입이 있을거에요
MCprotein
reviewed
Dec 25, 2024
| @@ -0,0 +1,3 @@ | |||
| DELETE https://panda-market-api.vercel.app/products/482/favorite | |||
| Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NTUwLCJzY29wZSI6ImFjY2VzcyIsImlhdCI6MTczNDcyMTc0NSwiZXhwIjoxNzM0NzIzNTQ1LCJpc3MiOiJzcC1wYW5kYS1tYXJrZXQifQ.hJYZe6ncrBdYh5iy02g8MQpF58hap9ghzdLbMVY0sQI | |||
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 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.
Sprint 10 요구사항
기본
Github에 위클리 미션 PR을 만들어 주세요.
React.js 혹은 Next.js를 사용해 진행합니다.
(풀스택) 설계한 백엔드 코드에 맞게 프론트엔드 코드를 변경해 주세요.
프론트엔드 구현 요구사항
중고마켓 페이지
상품 등록하기 페이지
심화
상태코드 (웹 API 관련)
인증
OAuth를 활용한 인증
(생략 가능) 자유게시판 게시물 등록
Sprint 11 요구사항
기본
Github에 위클리 미션 PR을 만들어 주세요.
React 및 Express를 사용해 진행합니다.
TypeScript를 활용해 프로젝트의 필요한 곳에 타입을 명시해 주세요.
any 타입의 사용은 최소화해 주세요.
복잡한 객체 구조나 배열 구조를 가진 변수에 인터페이스 또는 타입 별칭을 사용하세요.
Union, Intersection, Generics 등 고급 타입을 적극적으로 사용해 주세요.
타입 별칭 또는 유틸리티 타입을 사용해 타입 복잡성을 줄여주세요.
타입스크립트 컴파일러가 에러 없이 정상적으로 작동해야 합니다.
프론트엔드
멘토에게