-
Notifications
You must be signed in to change notification settings - Fork 2
feat: 고객 리뷰 관리 (작성 가능/내 리뷰) #22
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
8 commits
Select commit
Hold shift + click to select a range
7057248
feat: 리뷰 타입·API·mock·hooks 추가
61609fb
feat: 고객 리뷰 관리 UI 및 페이지 추가
8dbc0bb
feat: 헤더·세션에 리뷰 메뉴 및 라우트 연결
bca7ca4
feat: 내가 작성한 리뷰 카드에서 기사님 상세로 이동
ab5f3cc
refactor: 리뷰 API 연동 예시를 fetchInstance로 전환
8557d05
fix: apply review feedback for a11y, modal, token, and guards
e1f3834
fix: address review feedback for toast, star rating, and header
1a42f6b
fix: clear submit error when review inputs change
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import type { Metadata } from "next"; | ||
| import type { ReactNode } from "react"; | ||
|
|
||
| import ReviewsShell from "@/components/review/ReviewsShell"; | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: "리뷰 관리", | ||
| description: "작성 가능한 리뷰와 내가 작성한 리뷰를 관리합니다.", | ||
| }; | ||
|
|
||
| // 2026.07.27 정슬기 - [추가] 리뷰 관리 레이아웃 | ||
| export default function ReviewsLayout({ children }: { children: ReactNode }) { | ||
| return <ReviewsShell>{children}</ReviewsShell>; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import type { Metadata } from "next"; | ||
|
|
||
| import MyReviewsPageClient from "@/components/review/MyReviewsPageClient"; | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: "내가 작성한 리뷰", | ||
| }; | ||
|
|
||
| // 2026.07.27 정슬기 - [추가] 내가 작성한 리뷰 페이지 | ||
| export default function MyReviewsPage() { | ||
| return <MyReviewsPageClient />; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import { redirect } from "next/navigation"; | ||
|
|
||
| import { APP_ROUTES } from "@/lib/constants/appRoutes"; | ||
|
|
||
| // 2026.07.27 정슬기 - [추가] /reviews → 작성 가능 리뷰로 이동 | ||
| export default function ReviewsIndexPage() { | ||
| redirect(APP_ROUTES.REVIEWS.WRITABLE); | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import type { Metadata } from "next"; | ||
|
|
||
| import WritableReviewsPageClient from "@/components/review/WritableReviewsPageClient"; | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: "작성 가능한 리뷰", | ||
| }; | ||
|
|
||
| // 2026.07.27 정슬기 - [추가] 작성 가능한 리뷰 페이지 | ||
| export default function WritableReviewsPage() { | ||
| return <WritableReviewsPageClient />; | ||
| } |
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 |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| "use client"; | ||
|
|
||
| import Image from "next/image"; | ||
| import Link from "next/link"; | ||
|
|
||
| import { Text } from "@/components/common/Text"; | ||
| import { MoveTypeChip } from "@/components/estimate/received/MoveTypeChip"; | ||
| import ReviewStarRating from "@/components/review/ReviewStarRating"; | ||
| import { ProfileDefaultIcon } from "@/icons"; | ||
| import { APP_ROUTES } from "@/lib/constants/appRoutes"; | ||
| import { formatKoreanDateLong } from "@/lib/utils/estimateFormat"; | ||
| import type { MyReviewItem } from "@/types/review"; | ||
|
|
||
| interface MyReviewCardProps { | ||
| review: MyReviewItem; | ||
| } | ||
|
|
||
| // 2026.07.27 정슬기 - [추가] 내가 작성한 리뷰 카드 | ||
| // 2026.07.27 정슬기 - [수정] Mobile 주소 줄바꿈·타이포 / Desktop 작성일 우측 배치 | ||
| // 2026.07.27 정슬기 - [수정] 카드 클릭 시 기사님 상세 페이지로 이동 | ||
| export default function MyReviewCard({ review }: MyReviewCardProps) { | ||
| const { mover, estimateRequest, rating, content, createdAt } = review; | ||
| const displayName = mover.nickname?.trim() || mover.name; | ||
| const titleId = `my-review-${review.id}-title`; | ||
|
|
||
| return ( | ||
| <Link | ||
| href={APP_ROUTES.MOVERS.DETAIL(mover.id)} | ||
| aria-label={`${displayName} 기사님 상세 보기`} | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| className="bg-background-surface border-border-subtle shadow-estimate-card rounded-16 md:rounded-20 focus-visible:ring-border-brand flex w-full flex-col gap-12 border-[0.5px] px-16 py-20 focus-visible:ring-2 focus-visible:outline-none md:gap-16 md:px-24 md:py-28 lg:gap-20 lg:px-32 lg:py-32" | ||
| > | ||
| <div className="flex w-full flex-col gap-12 md:gap-16"> | ||
| <div className="flex flex-wrap items-center gap-8"> | ||
| <MoveTypeChip moveType={estimateRequest.moveType} size="sm" className="md:hidden" /> | ||
| <MoveTypeChip | ||
| moveType={estimateRequest.moveType} | ||
| size="md" | ||
| className="hidden py-4 pr-7 pl-5 md:inline-flex" | ||
| /> | ||
| </div> | ||
|
|
||
| <div className="flex w-full items-start gap-10 md:items-center md:gap-16"> | ||
| <div className="bg-background-avatar rounded-12 relative size-50 shrink-0 overflow-hidden"> | ||
| {mover.imageUrl ? ( | ||
| <Image | ||
| src={mover.imageUrl} | ||
| alt={`${displayName} 기사님 프로필`} | ||
| fill | ||
| sizes="50px" | ||
| className="object-cover" | ||
| /> | ||
| ) : ( | ||
| <ProfileDefaultIcon className="size-full" /> | ||
| )} | ||
| </div> | ||
|
|
||
| <div className="flex min-w-0 flex-1 flex-col gap-4"> | ||
| <div className="flex w-full items-start justify-between gap-8"> | ||
| <Text | ||
| as="h3" | ||
| id={titleId} | ||
| variant={{ base: "md-semibold", md: "lg-semibold" }} | ||
| className="text-text-primary min-w-0 break-words" | ||
| > | ||
| {displayName} 기사님 | ||
| </Text> | ||
| <Text | ||
| as="time" | ||
| dateTime={createdAt} | ||
| variant="md-medium" | ||
| className="text-text-muted hidden shrink-0 md:inline" | ||
| > | ||
| {formatKoreanDateLong(createdAt)} | ||
| </Text> | ||
| </div> | ||
| <Text | ||
| as="p" | ||
| variant={{ base: "sm-medium", md: "md-medium" }} | ||
| className="text-text-muted break-words" | ||
| > | ||
| {estimateRequest.fromAddress} | ||
| <span aria-hidden="true"> → </span> | ||
| <span className="sr-only">에서 </span> | ||
| {estimateRequest.toAddress} | ||
| </Text> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <ReviewStarRating value={rating} size="sm" label="내가 준 별점" /> | ||
|
|
||
| <Text | ||
| as="p" | ||
| variant={{ base: "md-regular", md: "lg-regular" }} | ||
| className="text-text-secondary break-words whitespace-pre-wrap" | ||
| > | ||
| {content} | ||
| </Text> | ||
|
|
||
| <Text | ||
| as="time" | ||
| dateTime={createdAt} | ||
| variant="sm-medium" | ||
| className="text-text-muted self-end md:hidden" | ||
| > | ||
| {formatKoreanDateLong(createdAt)} | ||
| </Text> | ||
| </Link> | ||
| ); | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.