mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Dynamic API routes (#836)
* Add dynamic API endpoints * Add missing dependency * Update api handlers * Updates * Fix build errors * Update package.json * Add checkout endpoint parser & update errors * Update tsconfig.json * Update cart.ts * Update parser * Update errors.ts * Update errors.ts * Move to Edge runtime * Revert to local * Fix switchable runtimes * Make nodejs default runtime * Update pnpm-lock.yaml * Update handlers * Fix build errors * Change headers
This commit is contained in:
@@ -12,8 +12,6 @@ import { ProductCard } from '@components/product'
|
||||
import { Container, Skeleton } from '@components/ui'
|
||||
|
||||
import useSearch from '@framework/product/use-search'
|
||||
|
||||
import getSlug from '@lib/get-slug'
|
||||
import rangeMap from '@lib/range-map'
|
||||
|
||||
const SORT = {
|
||||
@@ -29,6 +27,7 @@ import {
|
||||
getDesignerPath,
|
||||
useSearchMeta,
|
||||
} from '@lib/search'
|
||||
import ErrorMessage from './ui/ErrorMessage'
|
||||
|
||||
export default function Search({ categories, brands }: SearchPropsType) {
|
||||
const [activeFilter, setActiveFilter] = useState('')
|
||||
@@ -56,7 +55,7 @@ export default function Search({ categories, brands }: SearchPropsType) {
|
||||
})
|
||||
|
||||
if (error) {
|
||||
return <div>Failed to load</div>
|
||||
return <ErrorMessage error={error} />
|
||||
}
|
||||
|
||||
const handleClick = (event: any, filter: string) => {
|
||||
|
Reference in New Issue
Block a user