Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @g-hyxn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 게시물 상세 페이지로 이동하는 경로를 일관성 있게 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| commentCount={0} | ||
| timeAgo={new Date(post.createdAt).toLocaleDateString()} | ||
| onPostClick={() => navigate(`/post-content/${post.id}`)} | ||
| onPostClick={() => navigate(`/post/${post.id}`)} |
There was a problem hiding this comment.
라우트 경로가 문자열로 하드코딩되어 있어 유지보수가 어렵습니다. 이는 오타 발생 가능성을 높이고, 나중에 경로가 변경될 때 여러 파일을 수정해야 하는 번거로움을 야기할 수 있습니다.
중앙에서 경로를 관리하는 파일을 만들어 (예: src/constants/routes.ts) 사용하는 것을 권장합니다. 이렇게 하면 코드의 일관성을 유지하고 실수를 줄일 수 있습니다.
예시 (src/constants/routes.ts):
export const ROUTES = {
POST_DETAIL: (postId: number | string) => `/post/${postId}`,
// ... other routes
};적용 후:
import { ROUTES } from '@/constants/routes';
// ...
onPostClick={() => navigate(ROUTES.POST_DETAIL(post.id))}
💡 배경 및 개요
Resolves: #{이슈번호}
📃 작업내용
🙋♂️ 리뷰노트
✅ PR 체크리스트
.env,노션,README)"API 개발 완료됐어요","환경값 추가되었어요")🎸 기타