Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/Card/ReservationCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Link from 'next/link';

import StatusBadge from '../Badge/StatusBadge';
import Button from '../Button';

Expand Down Expand Up @@ -46,13 +48,13 @@ export default function ReservationCard({
status,
reviewSubmitted,
} = item;
const { title, bannerImageUrl } = activity;
const { title, bannerImageUrl, id: activityId } = activity;
const isCancelPossible = status === 'pending';
const isReviewPossible = !reviewSubmitted && status === 'completed';

return (
<div className={cardListWrap}>
<div className={cardVariants({ type })}>
<Link href={`/activity/${activityId}`} className={cardVariants({ type })}>
Comment thread
sylee86 marked this conversation as resolved.
<CardThumb type={type} bannerImageUrl={bannerImageUrl} title={title} />
<div className={cardDetailVariants({ type })}>
<div>
Expand All @@ -64,7 +66,7 @@ export default function ReservationCard({
<CardPrice price={totalPrice} headCount={headCount} />
</div>
</div>
</div>
</Link>
{(isReviewPossible || isCancelPossible) && (
<div className={btnPosition}>
{isReviewPossible && (
Expand Down
1 change: 1 addition & 0 deletions src/components/Card/card-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface ReservationCard {
export type activityType = {
title: string;
bannerImageUrl: string;
id: number;
};

export interface ReservationCardProps {
Expand Down