Spaces:
Sleeping
Sleeping
eeshaAI commited on
Commit ·
6c0d14d
1
Parent(s): 698bbca
fix: larger icons, better spacing, bigger Buy Now button, readable FOMO text
Browse files- src/app/page.tsx +21 -21
src/app/page.tsx
CHANGED
|
@@ -247,7 +247,7 @@ export default function HomePage() {
|
|
| 247 |
{liveCount > 0 && (
|
| 248 |
<Link href="/live" className="block mx-3 mt-2">
|
| 249 |
<div className="flex items-center gap-2 bg-black text-white rounded-xl px-4 py-2.5 hover:bg-neutral-800 transition-colors">
|
| 250 |
-
<span className="flex items-center gap-
|
| 251 |
<span className="w-2 h-2 bg-red-500 rounded-full animate-pulse" />
|
| 252 |
<span className="text-xs font-bold">LIVE NOW</span>
|
| 253 |
</span>
|
|
@@ -356,13 +356,13 @@ function FeedPostCard({
|
|
| 356 |
)}
|
| 357 |
</div>
|
| 358 |
{post.createdAt && (
|
| 359 |
-
<div className="text-
|
| 360 |
)}
|
| 361 |
</div>
|
| 362 |
{post.sellerId && (
|
| 363 |
<button
|
| 364 |
onClick={onFollow}
|
| 365 |
-
className={`text-
|
| 366 |
isFollowing ? 'bg-neutral-100 text-neutral-600' : 'bg-black text-white hover:bg-neutral-800'
|
| 367 |
}`}
|
| 368 |
>
|
|
@@ -390,26 +390,26 @@ function FeedPostCard({
|
|
| 390 |
|
| 391 |
{/* FOMO overlay */}
|
| 392 |
{fomoText && (
|
| 393 |
-
<div className="absolute top-3 left-3 bg-black/70 backdrop-blur-sm text-white text-
|
| 394 |
{fomoText}
|
| 395 |
</div>
|
| 396 |
)}
|
| 397 |
|
| 398 |
{/* Product badge */}
|
| 399 |
{post.product && (
|
| 400 |
-
<div className="absolute bottom-3 left-3 right-3 bg-white/
|
| 401 |
-
<div className="w-
|
| 402 |
{post.product.image_url && (
|
| 403 |
<img src={post.product.image_url} alt="" className="w-full h-full object-cover" />
|
| 404 |
)}
|
| 405 |
</div>
|
| 406 |
<div className="flex-1 min-w-0">
|
| 407 |
-
<div className="text-
|
| 408 |
-
<div className="text-
|
| 409 |
</div>
|
| 410 |
<button
|
| 411 |
onClick={onAddToCart}
|
| 412 |
-
className="bg-black text-white text-
|
| 413 |
>
|
| 414 |
Buy Now
|
| 415 |
</button>
|
|
@@ -418,33 +418,33 @@ function FeedPostCard({
|
|
| 418 |
</div>
|
| 419 |
|
| 420 |
{/* Action bar */}
|
| 421 |
-
<div className="flex items-center gap-
|
| 422 |
-
<button onClick={onLike} className="flex items-center gap-
|
| 423 |
<motion.div whileTap={{ scale: 1.3 }}>
|
| 424 |
-
<Heart className={`w-
|
| 425 |
</motion.div>
|
| 426 |
-
<span className="text-
|
| 427 |
</button>
|
| 428 |
-
<button className="flex items-center gap-
|
| 429 |
-
<MessageCircle className="w-
|
| 430 |
-
<span className="text-
|
| 431 |
</button>
|
| 432 |
-
<button className="flex items-center gap-
|
| 433 |
-
<Share2 className="w-
|
| 434 |
</button>
|
| 435 |
<button onClick={onSave} className="ml-auto">
|
| 436 |
-
<Bookmark className={`w-
|
| 437 |
</button>
|
| 438 |
</div>
|
| 439 |
|
| 440 |
{/* Caption */}
|
| 441 |
-
<div className="px-
|
| 442 |
<p className="text-sm text-black">
|
| 443 |
<span className="font-bold mr-1.5">{post.sellerName}</span>
|
| 444 |
{post.caption}
|
| 445 |
</p>
|
| 446 |
{post.product?.category && (
|
| 447 |
-
<p className="text-xs text-neutral-400 mt-1">#{post.product.category.toLowerCase().replace(/\s+/g, '')}</p>
|
| 448 |
)}
|
| 449 |
{post.comments > 0 && (
|
| 450 |
<button className="text-xs text-neutral-400 mt-1.5 hover:text-black transition-colors">
|
|
|
|
| 247 |
{liveCount > 0 && (
|
| 248 |
<Link href="/live" className="block mx-3 mt-2">
|
| 249 |
<div className="flex items-center gap-2 bg-black text-white rounded-xl px-4 py-2.5 hover:bg-neutral-800 transition-colors">
|
| 250 |
+
<span className="flex items-center gap-2">
|
| 251 |
<span className="w-2 h-2 bg-red-500 rounded-full animate-pulse" />
|
| 252 |
<span className="text-xs font-bold">LIVE NOW</span>
|
| 253 |
</span>
|
|
|
|
| 356 |
)}
|
| 357 |
</div>
|
| 358 |
{post.createdAt && (
|
| 359 |
+
<div className="text-xs text-neutral-400">{timeAgo(post.createdAt)}</div>
|
| 360 |
)}
|
| 361 |
</div>
|
| 362 |
{post.sellerId && (
|
| 363 |
<button
|
| 364 |
onClick={onFollow}
|
| 365 |
+
className={`text-sm font-bold px-4 py-2 rounded-full transition-all ${
|
| 366 |
isFollowing ? 'bg-neutral-100 text-neutral-600' : 'bg-black text-white hover:bg-neutral-800'
|
| 367 |
}`}
|
| 368 |
>
|
|
|
|
| 390 |
|
| 391 |
{/* FOMO overlay */}
|
| 392 |
{fomoText && (
|
| 393 |
+
<div className="absolute top-3 left-3 bg-black/70 backdrop-blur-sm text-white text-sm font-bold px-3 py-1.5 rounded-full">
|
| 394 |
{fomoText}
|
| 395 |
</div>
|
| 396 |
)}
|
| 397 |
|
| 398 |
{/* Product badge */}
|
| 399 |
{post.product && (
|
| 400 |
+
<div className="absolute bottom-3 left-3 right-3 bg-white/95 backdrop-blur-md rounded-2xl p-3 flex items-center gap-3">
|
| 401 |
+
<div className="w-12 h-12 rounded-lg overflow-hidden bg-neutral-100 shrink-0">
|
| 402 |
{post.product.image_url && (
|
| 403 |
<img src={post.product.image_url} alt="" className="w-full h-full object-cover" />
|
| 404 |
)}
|
| 405 |
</div>
|
| 406 |
<div className="flex-1 min-w-0">
|
| 407 |
+
<div className="text-sm font-bold text-black truncate">{post.product.name}</div>
|
| 408 |
+
<div className="text-base font-extrabold text-black">{formatPrice(post.product.price)}</div>
|
| 409 |
</div>
|
| 410 |
<button
|
| 411 |
onClick={onAddToCart}
|
| 412 |
+
className="bg-black text-white text-sm font-bold px-4 py-2.5 rounded-xl hover:bg-neutral-800 transition-colors shrink-0 active:scale-95 min-w-[80px]"
|
| 413 |
>
|
| 414 |
Buy Now
|
| 415 |
</button>
|
|
|
|
| 418 |
</div>
|
| 419 |
|
| 420 |
{/* Action bar */}
|
| 421 |
+
<div className="flex items-center gap-5 px-4 py-3">
|
| 422 |
+
<button onClick={onLike} className="flex items-center gap-2 group">
|
| 423 |
<motion.div whileTap={{ scale: 1.3 }}>
|
| 424 |
+
<Heart className={`w-7 h-7 transition-colors ${liked ? 'fill-black text-black' : 'text-black'}`} />
|
| 425 |
</motion.div>
|
| 426 |
+
<span className="text-sm font-semibold text-black">{formatCount(likeCount)}</span>
|
| 427 |
</button>
|
| 428 |
+
<button className="flex items-center gap-2">
|
| 429 |
+
<MessageCircle className="w-7 h-7 text-black" />
|
| 430 |
+
<span className="text-sm font-semibold text-black">{formatCount(post.comments)}</span>
|
| 431 |
</button>
|
| 432 |
+
<button className="flex items-center gap-2">
|
| 433 |
+
<Share2 className="w-7 h-7 text-black" />
|
| 434 |
</button>
|
| 435 |
<button onClick={onSave} className="ml-auto">
|
| 436 |
+
<Bookmark className={`w-7 h-7 transition-colors ${saved ? 'fill-black text-black' : 'text-black'}`} />
|
| 437 |
</button>
|
| 438 |
</div>
|
| 439 |
|
| 440 |
{/* Caption */}
|
| 441 |
+
<div className="px-4 pb-4">
|
| 442 |
<p className="text-sm text-black">
|
| 443 |
<span className="font-bold mr-1.5">{post.sellerName}</span>
|
| 444 |
{post.caption}
|
| 445 |
</p>
|
| 446 |
{post.product?.category && (
|
| 447 |
+
<p className="text-xs text-neutral-400 mt-1.5">#{post.product.category.toLowerCase().replace(/\s+/g, '')}</p>
|
| 448 |
)}
|
| 449 |
{post.comments > 0 && (
|
| 450 |
<button className="text-xs text-neutral-400 mt-1.5 hover:text-black transition-colors">
|