-
Notifications
You must be signed in to change notification settings - Fork 0
fix: 기능/CSS 에러 수정 및 개선 #143
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2b205d9
fix: 파일 업로드 훅 기본 이미지 사용 여부 옵션 추가 및 조건부 렌더링 적용
Yejiin21 322f638
fix: useEffect 무한 루프 에러 해결
Yejiin21 15ac425
design: 카드 정보 CSS 주석 처리
Yejiin21 24042aa
fix: remainDays가 false 값일때는 dDay UI가 보이지 않도록 수정
Yejiin21 f114ce6
feat: 호스트 선택 영역 안내 문구 추가
Yejiin21 36de17c
design: 이벤트 카드 최소, 최대 높이값 설정
Yejiin21 24b825f
feat: 가격에 쉼표 추가 포맷 적용
Yejiin21 75b7722
design: 관심페이지 헤더 아이콘 크기 조정
Yejiin21 640a0c8
feat: 메뉴 버튼 기능 추가
Yejiin21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,13 @@ const BottomBar = () => { | |
| <div | ||
| key={index} | ||
| className="flex flex-col justify-center items-center w-24 h-20 cursor-pointer" | ||
| onClick={() => navigate(item.path)} | ||
| onClick={() => { | ||
| if (location.pathname === item.path) { | ||
| navigate(-1); | ||
| } else { | ||
| navigate(item.path); | ||
| } | ||
| }} | ||
|
Comment on lines
+12
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 네비게이션 로직 개선 제안 현재 탭을 다시 클릭했을 때 뒤로 가기 기능을 추가한 것은 좋은 아이디어입니다. 하지만 몇 가지 개선사항을 제안드립니다:
다음과 같이 개선할 수 있습니다: -import { useNavigate } from 'react-router-dom';
+import { useNavigate, useLocation } from 'react-router-dom';
import { bottomBar } from '../../../shared/types/bottomBarType';
const BottomBar = () => {
const navigate = useNavigate();
+ const location = useLocation();
return (
<div className="flex justify-between fixed bottom-0 w-full max-w-lg h-20 rounded-t-[10px] bg-white border-t border-t-gray4">
{bottomBar.map((item, index) => (
<div
key={index}
className="flex flex-col justify-center items-center w-24 h-20 cursor-pointer"
onClick={() => {
if (location.pathname === item.path) {
- navigate(-1);
+ if (window.history.length > 1) {
+ navigate(-1);
+ }
} else {
navigate(item.path);
}
}}🤖 Prompt for AI Agents |
||
| > | ||
| <img src={item.icon} alt={`${item.label}Icon`} className={`${item.iconClassName} object-contain`} /> | ||
| <span className={`text-sm ${item.label === '관심' ? 'mb-1' : 'mt-2'}`}>{item.label}</span> | ||
|
|
||
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.
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.
🛠️ Refactor suggestion
가격 포맷팅 개선에 null 체크 추가가 필요합니다.
숫자를 로케일 형식으로 포맷팅하는 것은 사용자 경험을 크게 개선하는 좋은 변경입니다. 하지만
data?.totalPrice가 undefined일 때toLocaleString()메서드 호출 시 에러가 발생할 수 있습니다.다음과 같이 안전한 포맷팅을 제안합니다:
📝 Committable suggestion
🤖 Prompt for AI Agents