-
Notifications
You must be signed in to change notification settings - Fork 17
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
[김희성] Sprint 8 #114
The head ref may contain hidden characters: "next-\uAE40\uD76C\uC131-mission-8"
[김희성] Sprint 8 #114
Conversation
@@ -0,0 +1,71 @@ | |||
export async function GET(req) { |
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.
Page Router 를 사용할 때는 api route 의 함수명은 handler 로 사용하는 것이 맞습니다. App Router 의 route handler 문법로 작성하셔서 이는 프레임워크의 규칙에는 맞지 않아보입니다. Page Router 를 선택하셨다면 Page Router 만의 문법을 따라주시는 것이 좋겠습니다.
https://nextjs.org/docs/pages/building-your-application/routing/api-routes
@@ -0,0 +1,73 @@ | |||
import { useState } from "react"; | |||
|
|||
export default function SetComment({ articles, CommentAdd }) { |
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.
SetComment 는 동사형 명칭으로 컴포넌트명으로는 적합하지 않습니다. 댓글 등록폼을 의미하는 컴포넌트이니 명사형으로 CommentForm 정도가 적당할 것 같습니다.
@@ -0,0 +1,44 @@ | |||
import { useState } from "react"; | |||
import Image from "next/image"; | |||
import kebabIcon from "../../../public/Img/dropdown-icon/ic_kebab.png"; |
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.
public 폴더에 접근할 때 상대경로를 여러번 사용하는 것보다는 아래와 같이 절대경로 지정하셔서 사용하는 것을 권장 드립니다.
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"@public/*": ["public/*"],
"@images/*": ["public/Img/*"]
}
}
}
import ArticleCard from "@/components/article/ArticleCard"; | ||
import { useState, useEffect } from "react"; | ||
|
||
export default function BestArticle({ articles }) { |
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.
BestArticle 보다는 BestArticles 또는 BestArticleList 로 복수형 UI 를 암시하는 명칭이 클린코드에 더 가까울 것으로 보입니다.
import sortIcon from "../../../public/Img/dropdown-icon/ic_sort.png"; | ||
import dropArrow from "../../../public/Img/dropdown-icon/ic_arrow_down.png"; | ||
|
||
export function Dropdown() { |
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.
컴포넌트명은 모듈파일명칭과 동일하게 해주는 것과 default export 사용하시는 것이 컨벤션입니다.
export default function ArticleCustomSelect() { ... }
희성님 요구사항들에 따라 열심히 작업해주신 것으로 보입니다! 다만 App Router 와 Page Router 는 서로 다른 규칙과 api 를 사용하는 점을 잘 인지하고 공식문서 확인하셔야만 제대로 동작하는 웹사이트를 구성할 수 있다는 점을 꼭 명심하시면 좋겠습니다. 아래 추가적으로 코멘트들 남겨 드리겠습니다.
|
요구사항
기본
자유 게시판 페이지
게시글 등록 & 수정 페이지
게시글 상세 페이지
심화
주요 변경사항
스크린샷
멘토에게