mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Update types (#831)
* Update product types * Cart types progress, add zod & initial schema validator * Update normalize.ts * Update with-schema-parser.ts * Updated types, schemas & providers * Fix providers after schema parse errors * Fix paths * More provider fixes * Fix kibocommerce & commercejs * Add customer updated types & fixes * Add checkout & customer types * Import core types only from commerce * Update tsconfig.json * Convert hooks interfaces to types * Requested changes * Change to relative paths * Move Zod dependency
This commit is contained in:
@@ -5,10 +5,11 @@ import { Grid } from '@components/ui'
|
||||
import { ProductCard } from '@components/product'
|
||||
import s from './HomeAllProductsGrid.module.css'
|
||||
import { getCategoryPath, getDesignerPath } from '@lib/search'
|
||||
import { Brand, Category } from '@commerce/types/site'
|
||||
|
||||
interface Props {
|
||||
categories?: any
|
||||
brands?: any
|
||||
categories?: Category[]
|
||||
brands?: Brand[]
|
||||
products?: Product[]
|
||||
}
|
||||
|
||||
@@ -27,7 +28,7 @@ const HomeAllProductsGrid: FC<Props> = ({
|
||||
<a>All Categories</a>
|
||||
</Link>
|
||||
</li>
|
||||
{categories.map((cat: any) => (
|
||||
{categories?.map((cat: any) => (
|
||||
<li key={cat.path} className="py-1 text-accent-8 text-base">
|
||||
<Link href={getCategoryPath(cat.path)}>
|
||||
<a>{cat.name}</a>
|
||||
@@ -41,10 +42,10 @@ const HomeAllProductsGrid: FC<Props> = ({
|
||||
<a>All Designers</a>
|
||||
</Link>
|
||||
</li>
|
||||
{brands.flatMap(({ node }: any) => (
|
||||
<li key={node.path} className="py-1 text-accent-8 text-base">
|
||||
<Link href={getDesignerPath(node.path)}>
|
||||
<a>{node.name}</a>
|
||||
{brands?.map(({ path, name }) => (
|
||||
<li key={path} className="py-1 text-accent-8 text-base">
|
||||
<Link href={getDesignerPath(path)}>
|
||||
<a>{name}</a>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user