%PDF- %PDF-
| Direktori : /home2/rezakur1/muakita.rezakurnia.com/Mua-Kita-Web/src/components/pages/ |
| Current File : //home2/rezakur1/muakita.rezakurnia.com/Mua-Kita-Web/src/components/pages/MarketplacePage.tsx |
import React, { useState } from 'react';
import { ShoppingBag, Search, Star, MapPin, Tag, ShieldCheck, ExternalLink, Heart, Sparkles, Filter, CheckCircle2, ChevronRight, Plus } from 'lucide-react';
interface MarketplacePageProps {
onOpenLogin: () => void;
onNavigate: (page: string) => void;
}
export const MarketplacePage: React.FC<MarketplacePageProps> = ({ onOpenLogin, onNavigate }) => {
const [activeTab, setActiveTab] = useState<'mua' | 'products' | 'rentals'>('mua');
const [searchQuery, setSearchQuery] = useState('');
const [selectedCity, setSelectedCity] = useState('Semua Kota');
const muaListings = [
{
id: 1,
name: 'Glow Bridal & Beauty Studio',
owner: 'Giselle & Team MUA',
rating: 4.9,
reviews: 148,
city: 'Jakarta Selatan',
specialty: 'Wedding & Engagement',
priceFrom: 'Rp 2.500.000',
image: 'https://images.unsplash.com/photo-1487412720507-e7ab37603c6f?auto=format&fit=crop&q=80&w=400',
verified: true,
description: 'Spesialis makeup pengantin tradisional & modern glam dengan riasan tahan hingga 18 jam.'
},
{
id: 2,
name: 'LAVISH Beauty MUA',
owner: 'Anisa Putri, S.Sn',
rating: 4.8,
reviews: 94,
city: 'Bandung',
specialty: 'Sunda Siger & Modern Glam',
priceFrom: 'Rp 1.800.000',
image: 'https://images.unsplash.com/photo-1522337360788-8b13dee7a37e?auto=format&fit=crop&q=80&w=400',
verified: true,
description: 'Pusat tata rias pengantin Sunda Siger authentic dengan koleksi kebaya mewah.'
},
{
id: 3,
name: 'Bella Aesthetic Studio',
owner: 'Bella Safira',
rating: 4.9,
reviews: 210,
city: 'Surabaya',
specialty: 'Graduation & Photoshoot',
priceFrom: 'Rp 750.000',
image: 'https://images.unsplash.com/photo-1512496015851-a90fb38ba796?auto=format&fit=crop&q=80&w=400',
verified: true,
description: 'Layanan makeup wisuda & prewedding outdoor hemat dengan perlengkapan higienis.'
},
{
id: 4,
name: 'Flawless Beauty Artistry',
owner: 'Dewi Lestari',
rating: 4.7,
reviews: 76,
city: 'Medan',
specialty: 'Traditional & Airbrush',
priceFrom: 'Rp 1.500.000',
image: 'https://images.unsplash.com/photo-1526047932273-341f2a7631f9?auto=format&fit=crop&q=80&w=400',
verified: true,
description: 'Pelopor teknik airbrush makeup pengantin Batak & Melayu tanpa crack.'
},
{
id: 5,
name: 'Aura Glamour Studio',
owner: 'Aura Kasih',
rating: 4.9,
reviews: 82,
city: 'Yogyakarta',
specialty: 'Paes Ageng & Jogja Putri',
priceFrom: 'Rp 2.200.000',
image: 'https://images.unsplash.com/photo-1516975080664-ed2fc6a32937?auto=format&fit=crop&q=80&w=400',
verified: true,
description: 'Tata rias pengantin gaya Jogja Paes Ageng lengkap dengan melati segar dan busana adat.'
},
{
id: 6,
name: 'Aesthetic Touch Bali',
owner: 'Ni Made Ratna',
rating: 5.0,
reviews: 115,
city: 'Bali / Denpasar',
specialty: 'Destination Wedding',
priceFrom: 'Rp 3.000.000',
image: 'https://images.unsplash.com/photo-1500840218059-8dd35f3dfd65?auto=format&fit=crop&q=80&w=400',
verified: true,
description: 'Ahli rias pengantin internasional untuk cliffside wedding & beach engagement di Bali.'
},
];
const productsList = [
{
id: 101,
title: 'Professional Ring Light 18 Inch + Tripod 2M + Remote Control',
brand: 'Godox Beauty Pro',
discount: 'Diskon 20% Member MuaKita',
originalPrice: 'Rp 850.000',
promoPrice: 'Rp 680.000',
rating: 4.9,
reviews: 312,
image: 'https://images.unsplash.com/photo-1583001809873-a1284d5da086?auto=format&fit=crop&q=80&w=400'
},
{
id: 102,
title: 'Airbrush Makeup Kit Pro - Portable Silent Compressor 25PSI',
brand: 'Temptu Beauty',
discount: 'Cashback Rp 150rb',
originalPrice: 'Rp 3.200.000',
promoPrice: 'Rp 2.950.000',
rating: 4.9,
reviews: 88,
image: 'https://images.unsplash.com/photo-1512496015851-a90fb38ba796?auto=format&fit=crop&q=80&w=400'
},
{
id: 103,
title: 'MUA Train Case Koper Makeup Kaca Lampu LED Bluetooth',
brand: 'Glad2Glow Pro',
discount: 'Gratis Ongkir Se-Indonesia',
originalPrice: 'Rp 2.100.000',
promoPrice: 'Rp 1.850.000',
rating: 4.8,
reviews: 164,
image: 'https://images.unsplash.com/photo-1522337360788-8b13dee7a37e?auto=format&fit=crop&q=80&w=400'
}
];
return (
<div className="min-h-screen bg-slate-50 text-slate-900 font-sans pb-20">
{/* Top Banner */}
<div className="bg-gradient-to-b from-slate-900 via-slate-800 to-slate-900 text-white pt-12 pb-20 px-4 sm:px-6 lg:px-8 border-b border-slate-800">
<div className="max-w-7xl mx-auto text-center space-y-4">
<div className="inline-flex items-center gap-2 px-3.5 py-1.5 rounded-full bg-pink-500/20 text-pink-300 border border-pink-500/30 text-xs font-bold">
<ShoppingBag className="w-3.5 h-3.5 text-[#EC167F]" />
<span>Direktori MUA & Pasokan Peralatan Terverifikasi</span>
</div>
<h1 className="text-3xl sm:text-5xl font-black tracking-tight max-w-3xl mx-auto leading-tight">
MuaKita <span className="text-[#EC167F]">Beauty Marketplace</span>
</h1>
<p className="text-sm sm:text-base text-slate-300 max-w-2xl mx-auto font-medium">
Temukan studio MUA terbaik di kota Anda atau penuhi kebutuhan alat makeup, lighting, dan koper traincase dengan diskon khusus member.
</p>
{/* Search & Filter Bar */}
<div className="pt-6 max-w-3xl mx-auto flex flex-col sm:flex-row gap-3">
<div className="relative flex-1">
<Search className="w-4 h-4 absolute left-4 top-1/2 -translate-y-1/2 text-slate-400" />
<input
type="text"
placeholder="Cari nama MUA, kota, atau alat makeup..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="w-full bg-slate-800/90 border border-slate-700 text-white pl-11 pr-4 py-3 rounded-2xl text-xs focus:outline-none focus:border-[#EC167F] placeholder:text-slate-400"
/>
</div>
<select
value={selectedCity}
onChange={(e) => setSelectedCity(e.target.value)}
className="bg-slate-800/90 border border-slate-700 text-white px-4 py-3 rounded-2xl text-xs font-bold focus:outline-none focus:border-[#EC167F]"
>
<option value="Semua Kota">Seluruh Indonesia</option>
<option value="Jakarta">Jakarta</option>
<option value="Bandung">Bandung</option>
<option value="Surabaya">Surabaya</option>
<option value="Medan">Medan</option>
<option value="Yogyakarta">Yogyakarta</option>
<option value="Bali">Bali / Denpasar</option>
</select>
</div>
</div>
</div>
{/* Main Content Area */}
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 -mt-10 space-y-8">
{/* Sub-Category Nav */}
<div className="bg-white rounded-2xl p-2 border border-slate-200 shadow-md max-w-xl mx-auto flex items-center gap-2 text-xs font-extrabold">
<button
onClick={() => setActiveTab('mua')}
className={`flex-1 py-3 px-4 rounded-xl transition-all cursor-pointer text-center ${
activeTab === 'mua' ? 'bg-[#EC167F] text-white shadow-md' : 'text-slate-600 hover:text-slate-900'
}`}
>
Direktori Studio MUA
</button>
<button
onClick={() => setActiveTab('products')}
className={`flex-1 py-3 px-4 rounded-xl transition-all cursor-pointer text-center ${
activeTab === 'products' ? 'bg-[#EC167F] text-white shadow-md' : 'text-slate-600 hover:text-slate-900'
}`}
>
Peralatan & Tools Pro
</button>
</div>
{activeTab === 'mua' ? (
<div className="space-y-6">
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
<div>
<h2 className="text-xl font-black text-slate-900">MUA Terverifikasi MuaKita</h2>
<p className="text-xs text-slate-500">MUA terdaftar yang telah menggunakan sistem reservasi MuaKita</p>
</div>
<button
onClick={onOpenLogin}
className="px-4 py-2.5 bg-slate-900 hover:bg-slate-800 text-white rounded-xl text-xs font-extrabold transition-all cursor-pointer flex items-center gap-2 shadow-md"
>
<Plus className="w-4 h-4 text-[#EC167F]" />
<span>Daftarkan Studio Anda di Direktori</span>
</button>
</div>
{/* MUA Cards Grid */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{muaListings.map((item) => (
<div key={item.id} className="bg-white rounded-3xl border border-slate-200 overflow-hidden shadow-sm hover:shadow-xl transition-all flex flex-col justify-between">
<div>
<div className="relative h-48 bg-slate-100">
<img src={item.image} alt={item.name} className="w-full h-full object-cover" />
{item.verified && (
<span className="absolute top-3 right-3 bg-white/95 backdrop-blur-xs text-emerald-600 px-3 py-1 rounded-full text-[10px] font-black flex items-center gap-1 shadow-md">
<ShieldCheck className="w-3.5 h-3.5" />
<span>Verified MUA</span>
</span>
)}
</div>
<div className="p-5 space-y-3">
<div>
<div className="flex items-center justify-between">
<h3 className="text-base font-extrabold text-slate-900">{item.name}</h3>
<div className="flex items-center gap-1 text-amber-500 font-extrabold text-xs">
<Star className="w-3.5 h-3.5 fill-amber-400" />
<span>{item.rating}</span>
<span className="text-[10px] text-slate-400 font-normal">({item.reviews})</span>
</div>
</div>
<span className="text-xs text-slate-500 block font-medium mt-0.5">{item.owner}</span>
</div>
<p className="text-xs text-slate-600 font-medium line-clamp-2 leading-relaxed">
{item.description}
</p>
<div className="flex flex-wrap gap-2 text-[10px] font-bold">
<span className="px-2.5 py-1 bg-slate-100 text-slate-700 rounded-lg flex items-center gap-1">
<MapPin className="w-3 h-3 text-[#EC167F]" />
<span>{item.city}</span>
</span>
<span className="px-2.5 py-1 bg-pink-50 text-[#EC167F] rounded-lg flex items-center gap-1">
<Tag className="w-3 h-3" />
<span>{item.specialty}</span>
</span>
</div>
</div>
</div>
<div className="p-5 pt-0 border-t border-slate-100 mt-2 flex items-center justify-between">
<div>
<span className="text-[10px] text-slate-400 block font-medium uppercase tracking-wider">Mulai Dari</span>
<span className="text-sm font-black text-[#EC167F]">{item.priceFrom}</span>
</div>
<button
onClick={onOpenLogin}
className="px-4 py-2 bg-slate-900 hover:bg-slate-800 text-white text-xs font-bold rounded-xl transition-all cursor-pointer flex items-center gap-1"
>
<span>Form Booking</span>
<ChevronRight className="w-3.5 h-3.5" />
</button>
</div>
</div>
))}
</div>
</div>
) : (
/* Products Grid */
<div className="space-y-6">
<div>
<h2 className="text-xl font-black text-slate-900">Suplai & Peralatan MUA Pro</h2>
<p className="text-xs text-slate-500">Peralatan berkualitas dengan potongan harga khusus member MuaKita</p>
</div>
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
{productsList.map((prod) => (
<div key={prod.id} className="bg-white rounded-3xl border border-slate-200 p-5 space-y-4 shadow-sm hover:shadow-xl transition-all flex flex-col justify-between">
<div className="space-y-4">
<div className="h-52 rounded-2xl overflow-hidden bg-slate-100 relative">
<img src={prod.image} alt={prod.title} className="w-full h-full object-cover" />
<span className="absolute top-3 left-3 bg-[#EC167F] text-white px-3 py-1 rounded-full text-[10px] font-black uppercase">
{prod.discount}
</span>
</div>
<div>
<span className="text-xs text-slate-400 font-extrabold block">{prod.brand}</span>
<h3 className="text-sm font-extrabold text-slate-900 leading-snug mt-1">{prod.title}</h3>
</div>
<div className="flex items-baseline gap-2">
<span className="text-lg font-black text-[#EC167F]">{prod.promoPrice}</span>
<span className="text-xs text-slate-400 line-through font-medium">{prod.originalPrice}</span>
</div>
</div>
<button
onClick={onOpenLogin}
className="w-full py-3 bg-pink-50 hover:bg-pink-100 text-[#EC167F] font-extrabold rounded-2xl text-xs transition-all cursor-pointer"
>
Beli Dengan Diskon Member
</button>
</div>
))}
</div>
</div>
)}
</div>
</div>
);
};