"update product list rendering"

This commit is contained in:
louiscklaw
2025-06-15 13:07:47 +08:00
parent e791b01160
commit 8444b947a4
2 changed files with 7 additions and 39 deletions

View File

@@ -1,30 +0,0 @@
// src/app/api/product/image/upload/route.ts
//
// PURPOSE:
// handle upload product image
//
// RULES:
// T.B.A.
import type { NextRequest } from 'next/server';
import { STATUS, response, handleError } from 'src/utils/response';
// import prisma from '../../../lib/prisma';
// ----------------------------------------------------------------------
/** **************************************
* GET - Products
*************************************** */
export async function POST(req: NextRequest) {
try {
const { data } = await req.json();
console.log('helloworld');
return response({ hello: 'world' }, STATUS.OK);
} catch (error) {
console.log({ hello: 'world' });
return handleError('Product - store product image', error);
}
}

View File

@@ -17,15 +17,13 @@ export function ProductList({ products, loading, sx, ...other }: Props) {
const renderLoading = () => <ProductItemSkeleton />;
const renderList = () =>
products.map((product) => {
return (
products.map((product) => (
<ProductItem
key={product.id}
product={product}
detailsHref={paths.product.details(product.id)}
/>
);
});
));
return (
<>