-
Notifications
You must be signed in to change notification settings - Fork 1
feat/57 리뷰카드 컴포넌트 UI 구현 #58
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import Avatar from '@/components/Avatar'; | ||
|
|
||
| interface UserReviewProps { | ||
| userName: string; | ||
| date: string; | ||
| reviewText: string; | ||
| avatarSrc: string; | ||
| } | ||
|
|
||
| export default function ReviewCard({ | ||
| userName, | ||
| date, | ||
| reviewText, | ||
| avatarSrc, | ||
| }: UserReviewProps) { | ||
| return ( | ||
| <div className='mx-auto flex max-w-md items-start gap-6 p-6 text-black md:max-w-2xl'> | ||
| <Avatar src={avatarSrc} size='sm' /> | ||
| <div className='grid flex-1 gap-6'> | ||
| <div className='flex items-center gap-10 text-sm md:text-lg'> | ||
| <p className='font-bold'>{userName}</p> | ||
| <p className='text-black'>|</p> | ||
| <p className='text-gray-600'>{date}</p> | ||
| </div> | ||
| <p className='text-sm leading-relaxed text-black md:text-lg'> | ||
| {reviewText} | ||
| </p> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| import { mockActivity } from './mock/mock'; | ||
| import Title from './components/Title'; | ||
| import ImageGrid from './components/ImageGrid'; | ||
| import ReviewCard from './components/ReviewCard'; | ||
|
|
||
| export default function ActivityDetailPage() { | ||
| const { | ||
|
|
@@ -36,6 +37,12 @@ export default function ActivityDetailPage() { | |
| <p>{description}</p> | ||
| </div> | ||
| </div> | ||
| <ReviewCard | ||
| userName='강지현' | ||
| date='2023. 2. 4' | ||
| reviewText='전문가가 직접 강사로 참여하기 때문에 어떤 수준의 춤추는 사람도 쉽게 이해할 수 있었습니다. 이번 체험을 거쳐 저의 춤추기 실력은 더욱 향상되었어요.' | ||
| avatarSrc='/test/image1.png' | ||
| /> | ||
|
Comment on lines
+40
to
+45
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. 💡 Verification agent 🧩 Analysis chain하드코딩된 테스트 데이터를 동적 데이터로 교체하세요. 현재 정적 데이터로 구현되어 있는데, 향후 실제 리뷰 데이터와 연동할 계획을 세우고 구조를 개선하는 것을 권장합니다. 다음과 같은 개선 사항을 고려해보세요:
interface Review {
id: string;
userName: string;
date: string;
reviewText: string;
avatarSrc: string;
}
{mockActivity.reviews?.map((review) => (
<ReviewCard
key={review.id}
userName={review.userName}
date={review.date}
reviewText={review.reviewText}
avatarSrc={review.avatarSrc}
/>
))}
이미지 파일이 존재하는지 확인해보겠습니다: 🏁 Script executed: #!/bin/bash
# 테스트 이미지 파일 존재 여부 확인
find . -name "image1.png" -path "*/test/*" 2>/dev/null
ls -la public/test/image1.png 2>/dev/null || echo "이미지 파일이 존재하지 않습니다"Length of output: 174 동적 리뷰 데이터 연동 및 구조화 필요 이미지 경로(
🤖 Prompt for AI Agents |
||
| </div> | ||
| ); | ||
| } | ||
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
접근성과 시맨틱을 개선하세요.
구분자로 사용된 파이프 문자(
|)가 스크린 리더에서 의미 없이 읽힐 수 있습니다. 또한 날짜 정보에 대한 시맨틱 마크업이 부족합니다.<div className='flex items-center gap-10 text-sm md:text-lg'> <p className='font-bold'>{userName}</p> - <p className='text-black'>|</p> - <p className='text-gray-600'>{date}</p> + <span className='text-black' aria-hidden="true">|</span> + <time className='text-gray-600'>{date}</time> </div>📝 Committable suggestion
🤖 Prompt for AI Agents