refactor: extract sections

This commit is contained in:
Zotov Ivan Yuryevich
2026-04-04 19:28:07 +03:00
parent 18001a918f
commit 56f6ce41c1
17 changed files with 139 additions and 116 deletions

25
src/sections/Vendors.tsx Normal file
View File

@@ -0,0 +1,25 @@
import { VendorCard } from '../components/VendorCard'
interface Vendor {
name?: string
description?: string
products?: string[]
}
interface VendorsProps {
vendors?: Vendor[]
}
export function Vendors({ vendors }: VendorsProps) {
if (vendors && vendors.length > 0) {
return (
<div className="max-w-400 mx-auto px-6 xl:px-12 2xl:px-16 py-20">
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
{vendors.map(({ name, description, products }, index) => (
<VendorCard key={index} name={name} description={description} products={products} />
))}
</div>
</div>
)
}
}