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: '/post',
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 개발 완료됐어요","환경값 추가되었어요")🎸 기타