MED-193: improve mobile design for cart tables

This commit is contained in:
Danel Kungla
2025-10-08 13:50:04 +03:00
parent 17e7a98534
commit 3a8d73e742
12 changed files with 362 additions and 127 deletions

View File

@@ -5,7 +5,7 @@ import { redirect } from 'next/navigation';
import { sdk } from '@lib/config';
import medusaError from '@lib/util/medusa-error';
import { HttpTypes, StoreCart } from '@medusajs/types';
import { HttpTypes, StoreCart, StoreCartPromotion } from '@medusajs/types';
import { getLogger } from '@kit/shared/logger';
@@ -25,7 +25,9 @@ import { getRegion } from './regions';
* @param cartId - optional - The ID of the cart to retrieve.
* @returns The cart object if found, or null if not found.
*/
export async function retrieveCart(cartId?: string) {
export async function retrieveCart(
cartId?: string,
): Promise<(StoreCart & { promotions: StoreCartPromotion[] }) | null> {
const id = cartId || (await getCartId());
if (!id) {