Skip to content

Commit d7a4c02

Browse files
author
ksh277
committed
Apply recent changes
1 parent 983cd9e commit d7a4c02

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/components/WeeklyRankingCards.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ export default function WeeklyRankingCards({
124124
<div className="flex justify-between items-center">
125125
<h2 className="text-xl font-bold">주간 랭킹 - {getSellerTypeLabel(sellerType)}</h2>
126126
</div>
127-
<div className="md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible space-x-4 md:space-x-0 pb-4 md:pb-0 scrollbar-hide">
127+
<div className="md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible gap-4 md:gap-0 pb-4 md:pb-0 scrollbar-hide px-2 md:px-0">
128128
{Array.from({ length: limit }).map((_, index) => (
129-
<div key={index} className="bg-white rounded-xl border p-4 animate-pulse min-w-[200px] md:min-w-0 flex-shrink-0 md:flex-shrink">
130-
<div className="w-full h-96 bg-gray-300 rounded-lg mb-4"></div>
131-
<div className="h-4 bg-gray-300 rounded mb-2"></div>
132-
<div className="h-3 bg-gray-300 rounded w-2/3 mb-2"></div>
133-
<div className="h-3 bg-gray-300 rounded w-1/2"></div>
129+
<div key={index} className="bg-white rounded-xl border p-3 md:p-4 animate-pulse w-[280px] md:w-auto flex-shrink-0 md:flex-shrink">
130+
<div className="w-full h-64 md:h-96 bg-gray-300 rounded-lg mb-3 md:mb-4"></div>
131+
<div className="h-3 md:h-4 bg-gray-300 rounded mb-2"></div>
132+
<div className="h-2 md:h-3 bg-gray-300 rounded w-2/3 mb-1 md:mb-2"></div>
133+
<div className="h-2 md:h-3 bg-gray-300 rounded w-1/2"></div>
134134
</div>
135135
))}
136136
</div>
@@ -172,22 +172,22 @@ export default function WeeklyRankingCards({
172172
</div>
173173

174174
{/* Mobile: Horizontal scroll, Desktop: Grid */}
175-
<div className="md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible space-x-4 md:space-x-0 pb-4 md:pb-0 scrollbar-hide">
175+
<div className="md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible gap-4 md:gap-0 pb-4 md:pb-0 scrollbar-hide px-2 md:px-0">
176176
{rankings.map((product, index) => (
177177
<Link
178178
key={product.product_id}
179179
href={`/products/${product.product_id}`}
180180
onClick={() => handleProductClick(product.product_id)}
181181
className="block group"
182182
>
183-
<div className="bg-white rounded-xl border-2 border-gray-100 p-5 hover:shadow-xl hover:border-blue-200 transition-all duration-300 relative min-w-[200px] md:min-w-0 flex-shrink-0 md:flex-shrink">
183+
<div className="bg-white rounded-xl border-2 border-gray-100 p-3 md:p-5 hover:shadow-xl hover:border-blue-200 transition-all duration-300 relative w-[280px] md:w-auto flex-shrink-0 md:flex-shrink">
184184
{showRankNumbers && (
185-
<div className={`absolute -top-2 -left-2 px-3 py-1 rounded-full flex items-center justify-center text-xs font-bold ${getRankBadgeColor(index + 1)} transform rotate-3`}>
185+
<div className={`absolute -top-2 -left-2 px-2 py-1 md:px-3 md:py-1 rounded-full flex items-center justify-center text-xs font-bold ${getRankBadgeColor(index + 1)} transform rotate-3`}>
186186
{getRankLabel(index + 1)}
187187
</div>
188188
)}
189189

190-
<div className="relative w-full h-96 mb-4 overflow-hidden rounded-xl bg-gray-100 shadow-md">
190+
<div className="relative w-full h-64 md:h-96 mb-3 md:mb-4 overflow-hidden rounded-xl bg-gray-100 shadow-md">
191191
{product.product_image ? (
192192
<Image
193193
src={product.product_image}
@@ -206,23 +206,23 @@ export default function WeeklyRankingCards({
206206
<div className="absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-10 transition-all duration-300 rounded-xl"></div>
207207
</div>
208208

209-
<div className="space-y-2">
210-
<h3 className="font-bold text-gray-900 text-base mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors leading-tight">
209+
<div className="space-y-1 md:space-y-2">
210+
<h3 className="font-bold text-gray-900 text-sm md:text-base mb-1 md:mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors leading-tight">
211211
{product.product_name}
212212
</h3>
213213

214214
<div className="space-y-1">
215-
<p className="text-gray-700 text-sm font-medium">
215+
<p className="text-gray-700 text-xs md:text-sm font-medium">
216216
{product.seller_name.includes('샘플') ? `창작자 ${String.fromCharCode(65 + index)}` : product.seller_name}
217217
</p>
218218

219-
<p className="text-gray-500 text-xs leading-relaxed">
219+
<p className="text-gray-500 text-xs leading-relaxed hidden md:block">
220220
{getCreatorDescription(product.seller_name, index + 1)}
221221
</p>
222222
</div>
223223

224-
<div className="pt-2 border-t border-gray-100">
225-
<span className="font-bold text-blue-600 text-lg">
224+
<div className="pt-1 md:pt-2 border-t border-gray-100">
225+
<span className="font-bold text-blue-600 text-base md:text-lg">
226226
{formatPrice(product.product_price)}
227227
</span>
228228
<span className="text-xs text-gray-500 ml-1">부터</span>

0 commit comments

Comments
 (0)