Skip to content

Commit 9aa8acc

Browse files
committed
fix: PostCard 높이 수정
1 parent a0292c7 commit 9aa8acc

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

src/components/Post/PostCard.tsx

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ export default function PostCard({
4747
return (
4848
<article
4949
className={cn(
50-
"grid p-5 md:p-6 lg:grid-cols-[1fr_346px] lg:gap-[31px] rounded-2xl",
50+
"grid p-5 sm:p-6 lg:grid-cols-[1fr_346px] lg:gap-[31px] rounded-2xl",
5151
backgroundColor,
5252
backgroundColor === "#ffffff" && "border border-gray-20 shadow-sm",
5353
)}
5454
>
55-
<div className="relative w-full overflow-hidden rounded-xl">
55+
<div className="relative w-full overflow-hidden rounded-xl h-auto">
5656
<img
5757
src={imageUrl}
5858
alt={name}
59-
className="w-full h-[180px] object-cover md:h-[360px] lg:h-[308px]"
59+
className="w-full h-[180px] object-cover sm:h-[360px] lg:h-full"
6060
onError={(e) => {
6161
e.currentTarget.onerror = null;
6262
e.currentTarget.src = "/default-image.png";
@@ -71,40 +71,47 @@ export default function PostCard({
7171
</div>
7272
)}
7373
</div>
74-
<div className="flex flex-col justify-between mt-3 h-[251px] md:mt-4 md:h-[252px] lg:h-[292px]">
75-
<div className="space-y-2 md:space-y-3">
74+
<div className="flex flex-col justify-between mt-3 sm:mt-4 lg:h-auto">
75+
<div className="space-y-2 sm:space-y-3 flex-1">
7676
{!isShopInfo ? (
7777
<>
7878
<div className="flex flex-col gap-[2px]">
79-
<p className="mb-2 text-primary body2-bold md:body1-bold">
79+
<p className="mb-2 text-primary body2-bold sm:body1-bold">
8080
시급
8181
</p>
8282
<div className="flex items-center gap-2">
83-
<h2 className="text-[20px] font-bold md:text-[28px]">
83+
<h2 className="text-[20px] font-bold sm:text-[28px]">
8484
{hourlyPay?.toLocaleString()}
8585
</h2>
8686
{!closed && (
87-
<span className="inline-flex items-center gap-[2px] rounded-[20px] bg-primary px-3 py-1 text-[12px] font-normal leading-[16px] text-white md:body2-bold">
87+
<span className="inline-flex items-center gap-[2px] rounded-[20px] bg-primary px-3 py-1 text-[12px] font-normal leading-[16px] text-white sm:body2-bold">
8888
{rateText}
89-
<ArrowUp className="w-4 h-4 md:w-5 md:h-5" />
89+
<ArrowUp className="w-4 h-4 sm:w-5 sm:h-5" />
9090
</span>
9191
)}
9292
</div>
9393
</div>
94-
<div className="flex items-center gap-[6px] text-gray-50 sm:body2-regular md:body1-regular">
95-
<Time className="w-4 h-4 md:w-5 md:h-5" />
94+
<div className="flex items-center gap-[6px] text-gray-50 body2-regular sm:body1-regular">
95+
<Time className="w-4 h-4 sm:w-5 sm:h-5" />
9696
{timeRange}
9797
</div>
9898
</>
9999
) : (
100-
<p className="text-primary body2-bold md:body1-bold">식당</p>
100+
<p className="text-primary body2-bold sm:body1-bold">식당</p>
101101
)}
102102
{isShopInfo && <h2 className="text-[28px] font-bold">{name}</h2>}
103-
<div className="flex items-center gap-[6px] text-gray-50 sm:body2-regular md:body1-regular">
104-
<Location className="w-4 h-4 md:w-5 md:h-5" />
103+
<div className="flex items-center gap-[6px] text-gray-50 body2-regular sm:body1-regular">
104+
<Location className="w-4 h-4 sm:w-5 sm:h-5" />
105105
{address1}
106106
</div>
107-
<p className="text-black sm:body2-regular md:body1-regular">
107+
<p
108+
className={cn(
109+
"body2-regular sm:body1-regular break-words",
110+
description === "등록된 가게 정보가 없습니다."
111+
? "text-gray-40"
112+
: "text-black",
113+
)}
114+
>
108115
{description}
109116
</p>
110117
</div>

0 commit comments

Comments
 (0)