df1f32c23d
- Added `credentials: "include"` to fetch requests in LoginOtpPage and RegisterPage for cookie handling. - Introduced `eateryId` in PaymentPage to manage cart context. - Updated ProductCardProps and ShopCardProps to include `eateryId`. - Enhanced PaymentSummaryCard to accept `eateryId` prop. - Modified ShopCard to set `eateryId` in cart context on click. - Implemented menu item management in MenuItemsTab with add, edit, and delete functionalities. - Created new API functions for handling reviews and cart operations. - Updated GraphQL queries and mutations for menu items and cart management. - Added loading states and error handling in ProductGrid and ReviewModal. - Enhanced local storage management for cart and eatery ID.
12 lines
180 B
TypeScript
12 lines
180 B
TypeScript
export interface GqlCartItem {
|
|
productId: string;
|
|
quantity: number;
|
|
}
|
|
|
|
export interface GqlCart {
|
|
id: string;
|
|
userId: string;
|
|
eateryId: string;
|
|
items: GqlCartItem[];
|
|
}
|