Skip to content

Refactor Cart Types #27

Description

@rohan24may

I accidentally created a separate CartItem interface inside cartStore.ts instead of using the existing cart types architecture.

Currently:

  • types/order.ts contains a CartItem interface.
  • cartStore.ts contains another local CartItem interface:

interface CartItem {
item: MenuItem;
quantity: number;
}

This creates duplicate sources of truth.

Task 🔢 :

  • Review both CartItem definitions.
  • Decide whether the existing types/order.ts CartItem should be extended or the store structure should be updated.
  • Refactor cartStore.ts to use shared types from types/order.ts.
  • Remove the duplicate local CartItem interface.

Note : Current cart, checkout, and payment flows depend on the existing store structure, so this should be done carefully to avoid breaking those pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsenhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions