import { useState } from "react";
const COLORS = {
bg: "#0A0F1C",
surface: "#111827",
surfaceLight: "#1A2236",
surfaceHover: "#1F2A40",
border: "#2A3550",
borderLight: "#354263",
accent: "#22D3A7",
accentDim: "rgba(34,211,167,0.12)",
accentGlow: "rgba(34,211,167,0.25)",
warning: "#F59E0B",
warningDim: "rgba(245,158,11,0.12)",
hot: "#EF4444",
hotDim: "rgba(239,68,68,0.12)",
blue: "#3B82F6",
blueDim: "rgba(59,130,246,0.12)",
purple: "#A78BFA",
purpleDim: "rgba(167,139,250,0.12)",
text: "#F1F5F9",
textMuted: "#94A3B8",
textDim: "#64748B",
};
const tabs = [
{ id: "dashboard", label: "Dashboard", icon: "◐" },
{ id: "leads", label: "Lead Feed", icon: "◉" },
{ id: "listing", label: "My Listing", icon: "◧" },
{ id: "boost", label: "Boost & Upsells", icon: "△" },
];
const mockLeads = [
{
id: 1,
type: "Indoor Padel Center",
courts: 6,
region: "Lower Saxony, Germany",
budget: "€400K – €600K",
timeline: "Q3 2026",
specs: ["Indoor steel hall", "LED lighting", "Panoramic glass walls", "Pro-grade turf"],
posted: "2 hours ago",
heat: "hot",
credits: 25,
unlocked: false,
bidders: 1,
},
{
id: 2,
type: "Outdoor Padel Courts",
courts: 4,
region: "Bavaria, Germany",
budget: "€180K – €280K",
timeline: "Q2 2026",
specs: ["Outdoor installation", "Drainage system", "Windbreak fencing", "Night lighting"],
posted: "5 hours ago",
heat: "warm",
credits: 15,
unlocked: false,
bidders: 3,
},
{
id: 3,
type: "Indoor Padel & Fitness Complex",
courts: 10,
region: "North Rhine-Westphalia, Germany",
budget: "€800K – €1.2M",
timeline: "Q1 2027",
specs: ["Mixed-use facility", "Padel + gym + café", "Climate control", "Spectator area"],
posted: "1 day ago",
heat: "hot",
credits: 40,
unlocked: false,
bidders: 0,
},
{
id: 4,
type: "Padel Court Addition",
courts: 2,
region: "Hesse, Germany",
budget: "€80K – €140K",
timeline: "Q4 2026",
specs: ["Tennis club conversion", "2 courts", "Basic lighting", "Standard glass"],
posted: "2 days ago",
heat: "cool",
credits: 8,
unlocked: true,
bidders: 5,
contact: { name: "Thomas M.", org: "TC Wiesbaden e.V.", email: "t.m***@tc-wiesbaden.de", phone: "+49 611 ***" },
},
{
id: 5,
type: "Commercial Padel Venue",
courts: 8,
region: "Hamburg, Germany",
budget: "€500K – €750K",
timeline: "Q2 2026",
specs: ["Standalone commercial", "Bar/lounge area", "Premium courts", "Booking system integration"],
posted: "3 days ago",
heat: "warm",
credits: 30,
unlocked: false,
bidders: 2,
},
];
const upsells = [
{
id: "logo",
label: "Show Company Logo",
desc: "Display your logo next to your listing name",
price: 29,
period: "/mo",
boost: "+40% more clicks",
preselected: true,
active: true,
},
{
id: "highlight",
label: "Highlight Listing",
desc: "Yellow background to stand out in search results",
price: 39,
period: "/mo",
boost: "+65% more views",
preselected: true,
active: true,
},
{
id: "brandcolor",
label: "Custom Brand Color",
desc: "Use your brand color instead of yellow",
price: 59,
period: "/mo",
boost: "+80% brand recognition",
preselected: false,
active: false,
},
{
id: "verified",
label: "Verified Badge ✓",
desc: "Trusted supplier badge on your profile",
price: 49,
period: "/mo",
boost: "+55% more inquiries",
preselected: true,
active: true,
},
{
id: "sticky_week",
label: "Sticky Top 1 Week",
desc: "Pinned to the top of your category for 7 days",
price: 79,
period: "one-time",
boost: "2× more views",
preselected: false,
active: false,
},
{
id: "sticky_month",
label: "Sticky Top 1 Month",
desc: "Pinned to the top of your category for 30 days",
price: 199,
period: "one-time",
boost: "6× more views",
preselected: false,
active: false,
},
{
id: "newsletter",
label: "Featured in Newsletter",
desc: "Included in weekly email to 2,400+ project planners",
price: 99,
period: "/mo",
boost: "+120 targeted impressions/week",
preselected: false,
active: false,
},
{
id: "leadaccess",
label: "Lead Feed Access",
desc: "Browse & unlock leads in your categories",
price: 199,
period: "/mo",
boost: "Direct customer contact",
preselected: true,
active: true,
},
];
function HeatBadge({ heat }) {
const conf = {
hot: { bg: COLORS.hotDim, color: COLORS.hot, label: "🔥 Hot", border: "rgba(239,68,68,0.3)" },
warm: { bg: COLORS.warningDim, color: COLORS.warning, label: "◐ Warm", border: "rgba(245,158,11,0.3)" },
cool: { bg: COLORS.blueDim, color: COLORS.blue, label: "○ Cool", border: "rgba(59,130,246,0.3)" },
}[heat];
return (
{conf.label}
);
}
function StatCard({ label, value, sub, color }) {
return (
{label}
{value}
{sub &&
{sub}
}
);
}
function DashboardView() {
return (
Welcome back, PadelBau GmbH
Your supplier dashboard — February 2026
🔥 3 new leads match your profile
Indoor facilities in Lower Saxony, NRW, and Hamburg — total project value €1.7M+
Recent Activity
{[
{ time: "2h ago", text: "New lead posted: 6-court indoor center in Lower Saxony (€400K–€600K)", dot: COLORS.hot },
{ time: "1d ago", text: "Your listing was viewed 47 times today — 12 from the Padel Courts category", dot: COLORS.accent },
{ time: "2d ago", text: "Lead unlocked: TC Wiesbaden — 2-court addition project. Contact details available.", dot: COLORS.blue },
{ time: "3d ago", text: "Your 'Sticky Top' placement in Padel Courts expired. Renew to stay on top.", dot: COLORS.warning },
{ time: "5d ago", text: "Newsletter sent to 2,400 subscribers — your company was featured", dot: COLORS.purple },
].map((item, i) => (
))}
);
}
function LeadFeedView() {
const [leads, setLeads] = useState(mockLeads);
const [filter, setFilter] = useState("all");
const unlock = (id) => {
setLeads(leads.map(l => l.id === id ? {
...l,
unlocked: true,
contact: { name: "Max S.", org: "Padel Invest Nord GmbH", email: "m.s***@padel-invest.de", phone: "+49 40 ***" }
} : l));
};
const filtered = filter === "all" ? leads : leads.filter(l => l.heat === filter);
return (
Lead Feed
Browse anonymized project briefs · Spend credits to unlock contact details
Balance:
85 credits
{[
{ id: "all", label: "All Leads" },
{ id: "hot", label: "🔥 Hot" },
{ id: "warm", label: "◐ Warm" },
{ id: "cool", label: "○ Cool" },
].map(f => (
))}
{filtered.map(lead => (
{lead.heat === "hot" && !lead.unlocked && (
)}
{lead.type}
📍 {lead.region}
🏟 {lead.courts} courts
💰 {lead.budget}
📅 {lead.timeline}
{lead.posted}
{lead.specs.map((s, i) => (
{s}
))}
{lead.unlocked ? (
✓ Contact Unlocked
Contact
{lead.contact.name}
Organization
{lead.contact.org}
Email
{lead.contact.email}
Phone
{lead.contact.phone}
) : (
{lead.bidders === 0 ? (
✦ No other suppliers yet — be first!
) : (
{lead.bidders} supplier{lead.bidders > 1 ? "s" : ""} already unlocked this lead
)}
)}
))}
);
}
function ListingView() {
return (
Your Listing Preview
This is how your company appears in the directory
{/* Listing card preview */}
⭐ PROMOTED
PB
PadelBau GmbH
✓ VERIFIED
Premium padel court manufacturer & installer. 150+ courts built across DACH region. Full-service from planning to turnkey delivery.
📍 Cologne, Germany
🏟 150+ courts installed
⭐ 4.8/5 (23 reviews)
{["Padel Courts", "Court Construction", "LED Lighting", "Artificial Turf", "Planning & Design"].map((tag, i) => (
{tag}
))}
Active Boosts on Your Listing
{[
{ label: "Logo Visible", color: COLORS.accent },
{ label: "Yellow Highlight", color: COLORS.warning },
{ label: "Verified Badge", color: COLORS.accent },
{ label: "Lead Feed Access", color: COLORS.blue },
].map((b, i) => (
✓ {b.label}
))}
Listing Performance (Last 30 Days)
);
}
function BoostView() {
const [selected, setSelected] = useState(
Object.fromEntries(upsells.map(u => [u.id, u.preselected]))
);
const toggle = (id) => setSelected({ ...selected, [id]: !selected[id] });
const total = upsells.reduce((sum, u) => {
if (!selected[u.id]) return sum;
return sum + u.price;
}, 0);
const monthlyTotal = upsells.reduce((sum, u) => {
if (!selected[u.id] || u.period !== "/mo") return sum;
return sum + u.price;
}, 0);
const viewMultiplier = upsells.reduce((mult, u) => {
if (!selected[u.id]) return mult;
const m = parseFloat(u.boost.match(/[\d.]+/)?.[0] || 0);
if (u.boost.includes("×")) return mult * m;
if (u.boost.includes("%")) return mult * (1 + m / 100);
return mult;
}, 1);
return (
Boost Your Visibility
Select upgrades to stand out · Pre-selected options are our recommendation
{/* Upsell list */}
{upsells.map(u => {
const isOn = selected[u.id];
return (
toggle(u.id)} style={{
background: isOn ? COLORS.surfaceLight : COLORS.surface,
border: `1px solid ${isOn ? COLORS.accent + "40" : COLORS.border}`,
borderRadius: 10,
padding: "16px 18px",
cursor: "pointer",
transition: "all 0.15s",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
gap: 14,
}}>
€{u.price}{u.period}
{u.boost}
);
})}
{/* Summary sidebar */}
Your Plan
{upsells.filter(u => selected[u.id]).map(u => (
{u.label}
€{u.price}
))}
Monthly
€{monthlyTotal}/mo
Estimated view boost
{viewMultiplier.toFixed(1)}×
more visibility vs basic listing
Cancel anytime · No lock-in contracts
);
}
export default function SupplierDashboard() {
const [activeTab, setActiveTab] = useState("dashboard");
return (
{/* Sidebar */}
◈ PadelConnect
Supplier Portal
{tabs.map(tab => (
))}
PB
PadelBau GmbH
Premium Plan
{/* Main content */}
{activeTab === "dashboard" && }
{activeTab === "leads" && }
{activeTab === "listing" && }
{activeTab === "boost" && }
);
}