add readme

delete unrequired configs
This commit is contained in:
Danel Kungla
2025-09-19 18:07:31 +03:00
parent 0c2cfe6d18
commit 9ed52dcf02
74 changed files with 68 additions and 954 deletions

View File

@@ -45,10 +45,7 @@
"ansi-colors": "^4.1.3",
"autoprefixer": "^10.4.2",
"babel-loader": "^8.2.3",
"eslint": "8.10.0",
"eslint-config-next": "15.0.3",
"postcss": "^8.4.8",
"prettier": "^2.8.8",
"tailwindcss": "^3.0.23",
"typescript": "^5.3.2"
},

View File

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

View File

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

View File

@@ -55,7 +55,7 @@ export default async function PaginatedProducts({
return null;
}
let {
const {
response: { products, count },
} = await listProductsWithSort({
page,