--- import Layout from '../layouts/Layout.astro'; import Header from '../components/layout/Header'; import Footer from '../components/layout/Footer'; import ProductCard from '../components/product/ProductCard.astro'; import CartDrawer from '../components/cart/CartDrawer'; import CartBadge from '../components/cart/CartBadge'; // Fetch featured products const response = await fetch(`${import.meta.env.PUBLIC_SUPABASE_URL}/rest/v1/products?select=*&featured=eq.true&status=eq.active&limit=8`, { headers: { 'apikey': import.meta.env.PUBLIC_SUPABASE_ANON_KEY } }); const featuredProducts = await response.json(); // Fetch categories const categoriesRes = await fetch(`${import.meta.env.PUBLIC_SUPABASE_URL}/rest/v1/categories?select=*&isnull=parent_id&order=name.asc`, { headers: { 'apikey': import.meta.env.PUBLIC_SUPABASE_ANON_KEY } }); const categories = await categoriesRes.json(); // Fetch new arrivals const newArrivalsRes = await fetch(`${import.meta.env.PUBLIC_SUPABASE_URL}/rest/v1/products?select=*&status=eq.active&order=created_at.desc&limit=8`, { headers: { 'apikey': import.meta.env.PUBLIC_SUPABASE_ANON_KEY } }); const newArrivals = await newArrivalsRes.json(); ---

สินค้าคุณภาพดี ราคาถูกใจ

รวบรวมสินค้าดีๆ จากร้านค้าทั่วประเทศไทย พร้อมจัดส่งฟรี!

{categories.length > 0 && (

หมวดหมู่สินค้า

{categories.map(category => (
{category.icon || '📦'}

{category.name}

))}
)} {featuredProducts.length > 0 && (

สินค้าแนะนำ

ดูทั้งหมด →
{featuredProducts.map((product, index) => ( ))}
)} {newArrivals.length > 0 && (

สินค้าใหม่ล่าสุด

ดูทั้งหมด →
{newArrivals.map((product, index) => ( ))}
)}

จัดส่งฟรี

สั่งซื้อตั้งแต่ 500 บาท จัดส่งฟรีทั่วประเทศ

สินค้าคุณภาพ

ตรวจสอบคุณภาพก่อนส่งทุกชิ้น ให้คุณมั่นใจในสินค้าที่ได้รับ

ติดต่อง่าย

พร้อมตอบคำถาม 24 ชั่วโมง ผ่านแชทและโทรศัพท์

พร้อมเริ่มช้อปออนไลน์หรือยัง?

สมัครสมาชิกวันนี้ รับส่วนลดพิเศษ 10% สำหรับสั่งซื้อครั้งแรก!

สมัครสมาชิกฟรี