This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// path: store/basket/basket.ts (module) | |
import { RootState } from "../../store" | |
import inventory, { Product } from "../inventory/inventory" | |
export interface Item { productId: string, quantity: number } | |
export interface DisplayItem { product: Product, quantity: number } | |
export interface BasketState { items: Item[], isLoading: boolean } | |
const initialBasketState: BasketState = { items: [], isLoading: false } |