Skip to content

Commit

Permalink
hotfix: 구매처 하나만 보여지도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
oooppq committed Feb 1, 2024
1 parent eae357d commit 48d049f
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions components/detail/HereToBuy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,42 @@ const HereTobuy = async ({ id }: BuyProps) => {
<div className="mx-4">
<div className="h2 mb-[30px]">여기서 구매할 수 있어요</div>
<div className="grid gap-y-3">
{data.purchaseList?.map(
({
title,
link,
image,
}: {
title: string;
link: string;
image: string;
}) => (
<Link key={`${link}-${image}`} href={link} target="_blank">
<div className="flex items-center">
<Image
src={image}
alt="vendor"
width={80}
height={80}
objectFit="cover"
className="mr-[14px] w-20 h-20 rounded-sm"
/>
{data.purchaseList
?.slice(0, 1)
.map(
({
title,
link,
image,
}: {
title: string;
link: string;
image: string;
}) => (
<Link key={`${link}-${image}`} href={link} target="_blank">
<div className="flex items-center">
<Image
src={image}
alt="vendor"
width={80}
height={80}
objectFit="cover"
className="mr-[14px] w-20 h-20 rounded-sm"
/>

<div className="flex flex-col justify-center body2 font-medium">
<div className="mb-[10px]">{title}</div>
<div className="h-[21px] mb-[2px] text-acodegray-500">
{data.brandName}
</div>
<div className="leading-[14px] tracking-[-0.35px] text-acodegray-700">
{data.fragranceName}
<div className="flex flex-col justify-center body2 font-medium">
<div className="mb-[10px]">{title}</div>
<div className="h-[21px] mb-[2px] text-acodegray-500">
{data.brandName}
</div>
<div className="leading-[14px] tracking-[-0.35px] text-acodegray-700">
{data.fragranceName}
</div>
</div>
</div>
</div>
</Link>
),
) || (
</Link>
),
) || (
<div className="body2 h-20 w-full bg-acodegray-50 inline-flex items-center justify-center text-acodegray-300 rounded">
구매처를 찾는 중이에요
</div>
Expand Down

0 comments on commit 48d049f

Please sign in to comment.