eeshaAI commited on
Commit
6c0d14d
·
1 Parent(s): 698bbca

fix: larger icons, better spacing, bigger Buy Now button, readable FOMO text

Browse files
Files changed (1) hide show
  1. 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-1.5">
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-[10px] text-neutral-400">{timeAgo(post.createdAt)}</div>
360
  )}
361
  </div>
362
  {post.sellerId && (
363
  <button
364
  onClick={onFollow}
365
- className={`text-xs font-bold px-3 py-1.5 rounded-full transition-all ${
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-[10px] font-bold px-2.5 py-1 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/90 backdrop-blur-md rounded-xl p-2.5 flex items-center gap-2.5">
401
- <div className="w-10 h-10 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-xs font-bold text-black truncate">{post.product.name}</div>
408
- <div className="text-sm font-extrabold text-black">{formatPrice(post.product.price)}</div>
409
  </div>
410
  <button
411
  onClick={onAddToCart}
412
- className="bg-black text-white text-xs font-bold px-3 py-2 rounded-lg hover:bg-neutral-800 transition-colors shrink-0 active:scale-95"
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-4 px-3 py-2.5">
422
- <button onClick={onLike} className="flex items-center gap-1.5 group">
423
  <motion.div whileTap={{ scale: 1.3 }}>
424
- <Heart className={`w-6 h-6 transition-colors ${liked ? 'fill-black text-black' : 'text-black'}`} />
425
  </motion.div>
426
- <span className="text-xs font-semibold text-black">{formatCount(likeCount)}</span>
427
  </button>
428
- <button className="flex items-center gap-1.5">
429
- <MessageCircle className="w-6 h-6 text-black" />
430
- <span className="text-xs font-semibold text-black">{formatCount(post.comments)}</span>
431
  </button>
432
- <button className="flex items-center gap-1.5">
433
- <Share2 className="w-6 h-6 text-black" />
434
  </button>
435
  <button onClick={onSave} className="ml-auto">
436
- <Bookmark className={`w-6 h-6 transition-colors ${saved ? 'fill-black text-black' : 'text-black'}`} />
437
  </button>
438
  </div>
439
 
440
  {/* Caption */}
441
- <div className="px-3 pb-3">
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">