UNPKG

create-quickstart-app

Version:

CLI tool to generate Next.js projects with various configurations

22 lines (19 loc) 514 B
import { Product } from "./product"; // types/cart.ts export interface CartItem { id: string; productId: string; name: string; price: number; quantity: number; image: string; } export interface CartStore { items: CartItem[]; addItem: (product: Product, quantity: number) => void; updateQuantity: (itemId: string, newQuantity: number) => void; removeItem: (itemId: string) => void; clearCart: () => void; getTotalItems: () => number; getTotalAmount: () => number; }