// Shop — filters sidebar + sortable product grid function ShopScreen({ onAdd, onOpen }) { const { Icon } = window; const { ProductCard, Badge, Checkbox, Select } = window.SinopharmaDesignSystem_d11735; const all = window.SP_DATA.products; const [cat, setCat] = React.useState(null); const [sort, setSort] = React.useState('pop'); let list = cat ? all.filter((p) => p.category === cat) : all; if (sort === 'price') list = [...list].sort((a, b) => parseFloat(a.price.replace(',', '.')) - parseFloat(b.price.replace(',', '.'))); if (sort === 'rating') list = [...list].sort((a, b) => b.rating - a.rating); return (
{/* page head */}
Accueil Boutique

{cat || 'Toutes les formules'}

{list.length} produits · plantes tracées, dosages standardisés

{/* SIDEBAR */} {/* GRID */}
{cat ? {cat} : null} Bio Gélules
{list.map((p) => (
onOpen(p)} style={{ cursor: 'pointer' }}> onAdd(p)} />
))}
); } function FilterGroup({ title, children }) { return (

{title}

{children}
); } function FilterRow({ label, count, active, onClick }) { return ( ); } window.ShopScreen = ShopScreen;