/* Me2You - Seller flow: Dashboard, Create Listing wizard */ /* global React, Icon, StatusTag, Price, Field, panelStyle, btnPrimary, btnGhost, btnSmall, PRODUCTS, SAMPLE_ORDERS */ const { useState } = React; const SELLER_LISTINGS = [ { id:1, title:'Hisense 32" Smart TV', price:1850, status:'live', views:342, orders:3, emoji:'', bg:'linear-gradient(135deg,#FFE7C8,#FFF6E9)' }, { id:2, title:'Nike Air Max - UK 9', price:1200, status:'live', views:128, orders:1, emoji:'', bg:'linear-gradient(135deg,#DDF1E4,#FFF6E9)' }, { id:3, title:'Defy Microwave 20L', price:850, status:'pending', views:0, orders:0, emoji:'', bg:'linear-gradient(135deg,#ECE6F2,#FFF6E9)' }, ]; const SELLER_ORDERS = [ { id:'M2Y-2026-00248', item:'Hisense 32" Smart TV', buyer:'Nomsa M.', status:'paid', total:1910, date:'28 Apr 2026' }, { id:'M2Y-2026-00245', item:'Cast-iron pot, 4L', buyer:'Thandi K.', status:'dispatched', total:440, date:'26 Apr 2026' }, { id:'M2Y-2026-00241', item:'Samsung Galaxy A14', buyer:'James R.', status:'completed', total:1460, date:'22 Apr 2026' }, ]; function SellerDashboard({ onCreateListing, onNav }) { const [tab, setTab] = useState('overview'); const [onVacation, setOnVacation] = useState(false); const [awayFrom, setAwayFrom] = useState('26 May 2026'); const [backOn, setBackOn] = useState('3 Jun 2026'); const [vacationMsg, setVacationMsg] = useState('Away at a family event. Watching the shop, will reply on 3 June. Thanks for your patience.'); const [savedSettings, setSavedSettings] = useState(false); const stats = [ { label:'Revenue (30d)', value:'R 3 810', icon:'wallet' }, { label:'Active listings', value:'2', icon:'package' }, { label:'Orders (30d)', value:'5', icon:'receipt' }, { label:'Rating', value:'4.8 ', icon:'star' }, ]; return (

Seller dashboard

Welcome back, Thandi Q.

{stats.map(s => (
{s.label}
{s.value}
))}
{['overview','listings','orders','settings'].map(t => ( ))}
{tab === 'overview' && (

Recent orders

{SELLER_ORDERS.map(o => (
{o.item}
{o.id} - {o.buyer} - {o.date}
))}
)} {tab === 'listings' && (
{onVacation && (
Vacation mode is on New orders are paused until {backOn}. Every listing below shows a "Back soon" badge to buyers.
)} {SELLER_LISTINGS.map(l => (
{l.title}
{onVacation && ( Back {backOn} )}
{l.views}
views
))}
)} {tab === 'orders' && (
{SELLER_ORDERS.map(o => ( ))}
ReferenceItemBuyer StatusTotal
{o.id} {o.item} {o.buyer}
)} {tab === 'settings' && (

Availability

Pause new orders while you are away. Buyers still see your shop, marked as "Back soon".

Vacation mode
Pause new orders. Buyers still see listings, marked as "Back soon".
{onVacation && ( <>
setAwayFrom(e.target.value)}/> setBackOn(e.target.value)}/>