mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Fixes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { SWRHook } from '@commerce/utils/types'
|
||||
import { Product } from '@commerce/types'
|
||||
import useSearch, { UseSearch } from '@commerce/product/use-search'
|
||||
import { SearchProductsInput, SearchProductsData } from '@commerce/types'
|
||||
|
||||
import { ProductEdge } from '../schema'
|
||||
|
||||
import {
|
||||
@@ -11,6 +10,19 @@ import {
|
||||
normalizeProduct,
|
||||
} from '../utils'
|
||||
|
||||
export type SearchProductsInput = {
|
||||
search?: string
|
||||
categoryId?: string
|
||||
brandId?: string
|
||||
sort?: string
|
||||
locale?: string
|
||||
}
|
||||
|
||||
export type SearchProductsData = {
|
||||
products: Product[]
|
||||
found: boolean
|
||||
}
|
||||
|
||||
export default useSearch as UseSearch<typeof handler>
|
||||
|
||||
export const handler: SWRHook<
|
||||
|
Reference in New Issue
Block a user