fix: 글 작성 에러 수정 #50
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Summary of Changes
Hello @FlashingFuture, 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은 글 작성 과정에서 발생하던 TypeError를 해결하고, 경로 공유 시 코스 이미지가 제대로 표시되지 않던 문제를 수정합니다. 주요 변경 사항으로는 코스 API 응답 데이터의 타입 정의 및 매핑을 개선하고, 게시글 작성/수정 폼에서 코스 선택 및 이미지 처리 로직을 강화했습니다. 또한, 코스 목록 로딩 시 중복 요청을 방지하고 UI 오류 메시지 처리를 간소화하여 사용자 경험을 향상시켰습니다.
Highlights
- 글 작성 시 발생하던 에러 수정: 게시글 엔티티 매핑 시
author필드를 임시로'author'문자열로 설정하여TypeError발생 가능성을 제거했으며, 게시글 작성/수정 폼의 로직을 개선하여 코스 목록 로딩 시 중복 요청을 방지하고 카테고리 변경 시 목록 상태를 올바르게 초기화하도록 수정했습니다. - 경로 공유 시 이미지 표시 문제 해결: 코스 검색 API 응답을
CourseItem타입으로 매핑할 때length속성을 추가하고createdAt을date로 정확히 매핑하도록 개선했습니다. 또한,handleSelectCourse콜백을 추가하여 사용자가 코스를 선택할 때 해당 코스의imageUrl이 게시글에 올바르게 반영되도록 했으며, 이미지 URL이 없을 경우 기본 이미지 대신 빈 문자열을 사용하도록 변경했습니다.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
이번 PR은 글 작성 시 발생하던 타입 에러를 수정하고, 경로 공유 시 이미지 업로드 기능을 개선하는 내용을 담고 있습니다. 전반적으로 중복 요청 방지 로직 추가, 무한 스크롤 기능 개선 등 좋은 변경 사항들이 많습니다.
다만, 몇 가지 중요한 점들을 발견하여 리뷰 코멘트를 남겼습니다.
- API 응답 처리 시 타입 안정성을 높일 수 있는 부분이 있습니다.
- 게시글 목록에서 작성자 이름이 하드코딩되어 있어 수정이 필요합니다.
- 경로 공유 아이템 선택 로직에서 이미지 URL이 초기화되지 않는 버그가 있습니다.
- 목록 로딩 실패 시 에러를 처리하는 UI가 제거되어 사용자 경험을 해칠 수 있습니다.
자세한 내용은 각 파일의 코멘트를 확인해주세요.
|
/gemini review |
There was a problem hiding this comment.
Code Review
이번 PR은 글 작성 시 발생하던 타입 에러를 수정하고, 경로 공유 시 이미지가 올바르게 표시되도록 개선하는 내용을 담고 있습니다. 전반적으로 버그 수정과 기능 개선이 잘 이루어졌습니다. 코드 리뷰 과정에서 몇 가지 개선점을 발견했습니다. API 응답 처리 로직을 간소화하고, 잘못 하드코딩된 값을 수정하며, 특정 UI의 에러 처리 로직이 누락된 부분을 보완하는 것이 좋겠습니다. 또한, React Hook 사용법을 최적화하여 불필요한 렌더링을 방지할 수 있는 부분도 제안드렸습니다. 자세한 내용은 각 파일의 주석을 참고해 주세요.
작업 내용