add readme
delete unrequired configs
This commit is contained in:
@@ -15,7 +15,7 @@ export function sortProducts(
|
||||
products: HttpTypes.StoreProduct[],
|
||||
sortBy: SortOptions,
|
||||
): HttpTypes.StoreProduct[] {
|
||||
let sortedProducts = products as MinPricedProduct[];
|
||||
const sortedProducts = products as MinPricedProduct[];
|
||||
|
||||
if (['price_asc', 'price_desc'].includes(sortBy)) {
|
||||
// Precompute the minimum price for each product
|
||||
|
||||
@@ -111,9 +111,9 @@ export async function middleware(request: NextRequest) {
|
||||
|
||||
let response = NextResponse.redirect(redirectUrl, 307);
|
||||
|
||||
let cacheIdCookie = request.cookies.get('_medusa_cache_id');
|
||||
const cacheIdCookie = request.cookies.get('_medusa_cache_id');
|
||||
|
||||
let cacheId = cacheIdCookie?.value || crypto.randomUUID();
|
||||
const cacheId = cacheIdCookie?.value || crypto.randomUUID();
|
||||
|
||||
let regionMap;
|
||||
try {
|
||||
|
||||
@@ -55,7 +55,7 @@ export default async function PaginatedProducts({
|
||||
return null;
|
||||
}
|
||||
|
||||
let {
|
||||
const {
|
||||
response: { products, count },
|
||||
} = await listProductsWithSort({
|
||||
page,
|
||||
|
||||
Reference in New Issue
Block a user