Skip to content

[Feat] 홈 추가 페이지 구현#46

Merged
sispo3314 merged 13 commits intodevelopfrom
feat/#38/홈-추가-페이지-구현
Aug 3, 2025

Hidden character warning

The head ref may contain hidden characters: "feat/#38/\ud648-\ucd94\uac00-\ud398\uc774\uc9c0-\uad6c\ud604"
Merged

[Feat] 홈 추가 페이지 구현#46
sispo3314 merged 13 commits intodevelopfrom
feat/#38/홈-추가-페이지-구현

Conversation

@sispo3314
Copy link
Copy Markdown
Collaborator

@sispo3314 sispo3314 commented Aug 1, 2025

🔍 관련된 이슈

📝 작업 내용

  • 인기 리뷰 페이지 구현
  • 리뷰카드 컴포넌트 수정 (디폴트 썸네일 추가, variant: 'rating' 으로 설정하면 날짜와 별점도 받을 수 있도록 수정하였습니다.)
  • 좌석별 리뷰 조회 페이지 UI 구현

📸 스크린샷

image image

🚨 이슈

  • 해시태그 문구가 길게 수정되면서 리뷰 카드 컴포넌트의 해시태그가 중간에 잘리는 문제가 발생하여 우선 해시태그를 2개까지만 표시하는 것으로 수정해두었습니다.

📣 리뷰 요구사항

  • 좌석별 리뷰 조회 페이지 코드의 구조가 잘 잡혀있는지 봐주시면 감사하겠습니다...

✅ 체크리스트

  • 코드가 정상적으로 컴파일되나요?
  • merge할 브랜치의 위치를 확인했나요?
  • Label을 지정했나요?
  • 리뷰어를 지정했나요?

@sispo3314 sispo3314 self-assigned this Aug 1, 2025
@sispo3314 sispo3314 added the 🎨Style 스타일 추가 및 수정 label Aug 1, 2025
@sispo3314 sispo3314 linked an issue Aug 1, 2025 that may be closed by this pull request
3 tasks
@sispo3314 sispo3314 added the ✨Feature 새로운 기능 추가 label Aug 1, 2025
Copy link
Copy Markdown
Member

@dalzzy dalzzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니당 깔끔하게 구현 잘 해주신 것 같아요!! 👍🏻

Comment on lines 3 to 28
interface StarRatingProps {
rating: number;
color?: 'white' | 'red';
}

const StarRating = ({ rating }: StarRatingProps) => {
const StarRating = ({ rating, color = 'white' }: StarRatingProps) => {
const full = Math.floor(rating);
const half = rating % 1 >= 0.5;
const empty = 5 - full - (half ? 1 : 0);

const colorClass = color === 'red' ? 'fill-red-300 text-red-300' : 'fill-white text-white';

return (
<div className="flex gap-1">
<div className="flex">
{Array(full)
.fill(0)
.map((_, idx) => (
<StarFill key={`full-${idx}`} className="h-6 w-6 fill-white text-white" />
<StarFill key={`full-${idx}`} className={`h-6 w-6 ${colorClass}`} />
))}
{half && <StarHalf className="h-6 w-6 fill-white text-white" />}
{half && <StarHalf className={`h-6 w-6 ${colorClass}`} />}
{Array(empty)
.fill(0)
.map((_, idx) => (
<StarLine key={`empty-${idx}`} className="h-6 w-6 stroke-white text-white" />
<StarLine key={`empty-${idx}`} className={`h-6 w-6 ${colorClass}`} />
))}
</div>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

svg에 fill="current"로 설정해서 색상을 props로 제어할 수 있게 해주신 부분 넘 좋네요! 👏👏
재사용성도 좋아지고 깔끔하게 잘 구현하신 것 같아요! 굿굿

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다!!

Comment on lines +12 to +18
<Header
title="인기있는 후기"
showBack
showLike={false}
showBookmark={false}
onBackClick={() => navigate(-1)}
/>
Copy link
Copy Markdown
Member

@dalzzy dalzzy Aug 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 pull 하고

<Header leftSection='BACK'>인기있는 후기</Header>
로 바꿔주셔야할 것 같습니당

const navigate = useNavigate();
const top10Reviews = getTopReviewByLikes(bestReviewMock, 10);
return (
<div className="flex min-h-screen max-w-[430px] flex-col bg-gray-900 pt-11 pb-5 text-white">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max-w-[430px],bg-gray-900, text-white 전부 이미 전역으로 설정되어 있는 스타일이라 삭제해주셔도 괜찮을 것 같습니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 부분 포함된 파일 모두 수정했습니다!

Comment on lines +19 to +25
<Header
title=""
showBack
onBackClick={() => navigate('')}
showBookmark={false}
showLike={false}
/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분도용

Comment on lines +34 to +35
<span className="text-title-2 text-white">{calculateAverageRating(filteredReviews)}</span>
<span className="text-title-2 text-gray-500">({filteredReviews.length})</span>
Copy link
Copy Markdown
Member

@dalzzy dalzzy Aug 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"reviewCount": 1,
 "averageRating": 3.2,

스웨거에 리뷰갯수랑, 별점 평점 필드가 있어서 실제 api 연결할 때는 그냥 이 값으로 사용하면 될 것 같습니다!!
(아마 원래 빠진 부분이었는데 말씀드렸더니 백엔드에서 수정해주신 것 같습니다!)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 그렇군요! API 연결할 때 수정하겠습니다 감사합니당 <3<3

Copy link
Copy Markdown
Collaborator

@soyun-git121 soyun-git121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 전체적으로 봤는데 리뷰상세페이지나 다른부분들도 다 깔끔하고 좋은거같아용 수고하셨습니다!!

@sispo3314 sispo3314 merged commit 9979ee0 into develop Aug 3, 2025
1 check passed
@dalzzy dalzzy deleted the feat/#38/홈-추가-페이지-구현 branch August 8, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨Feature 새로운 기능 추가 🎨Style 스타일 추가 및 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] #38 홈 추가 페이지 UI 구현

3 participants