mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
update to agility/next
This commit is contained in:
@@ -15,6 +15,8 @@ import {
|
||||
getDesignerPath,
|
||||
useSearchMeta,
|
||||
} from '@lib/search'
|
||||
import { ModuleWithInit } from '@agility/nextjs'
|
||||
|
||||
|
||||
const SORT = Object.entries({
|
||||
'latest-desc': 'Latest arrivals',
|
||||
@@ -23,21 +25,24 @@ const SORT = Object.entries({
|
||||
'price-desc': 'Price: High to low',
|
||||
})
|
||||
|
||||
interface Fields {
|
||||
|
||||
interface ICustomData {
|
||||
categories: any
|
||||
brands: any
|
||||
}
|
||||
|
||||
interface Props {
|
||||
fields: Fields,
|
||||
customData: any
|
||||
interface IModule {
|
||||
}
|
||||
|
||||
const ProductSearch: FC<Props> = ({ fields, customData }) => {
|
||||
|
||||
const ProductSearch: ModuleWithInit<IModule, ICustomData> = ({ customData }) => {
|
||||
|
||||
const categories:[any] = customData.categories
|
||||
const brands:[any] = customData.brands
|
||||
|
||||
const [activeFilter, setActiveFilter] = useState('')
|
||||
const [toggleFilter, setToggleFilter] = useState(false)
|
||||
const [toggleFilter, setToggleFilter] = useState(false)
|
||||
|
||||
|
||||
const router = useRouter()
|
||||
const { asPath } = router
|
||||
@@ -447,4 +452,6 @@ const ProductSearch: FC<Props> = ({ fields, customData }) => {
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default ProductSearch
|
Reference in New Issue
Block a user