update to agility/next

This commit is contained in:
Joel Varty
2021-06-09 23:17:19 -04:00
parent 17f458b45b
commit e836a5950f
26 changed files with 26612 additions and 6639 deletions

View File

@@ -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