Update React Editor integration and clean up template

This commit is contained in:
Rami Bitar
2026-08-15 13:47:33 -04:00
parent 0a7ea0bf6b
commit 0fb6cef226
82 changed files with 113 additions and 913 deletions
-7
View File
@@ -1,6 +1,5 @@
import { gql } from '@shopify/hydrogen';
// Cart Fragment for consistent cart data
const CartFragment = gql(`
fragment CartFragment on Cart {
id
@@ -68,7 +67,6 @@ const CartFragment = gql(`
}
`);
// Create a new cart
export const CREATE_CART_MUTATION = gql(
`
mutation CreateCart($lines: [CartLineInput!], $country: CountryCode, $language: LanguageCode)
@@ -87,7 +85,6 @@ export const CREATE_CART_MUTATION = gql(
[CartFragment]
);
// Add lines to cart
export const ADD_CART_LINES_MUTATION = gql(
`
mutation AddCartLines($cartId: ID!, $lines: [CartLineInput!]!, $country: CountryCode, $language: LanguageCode)
@@ -106,7 +103,6 @@ export const ADD_CART_LINES_MUTATION = gql(
[CartFragment]
);
// Update cart lines
export const UPDATE_CART_LINES_MUTATION = gql(
`
mutation UpdateCartLines($cartId: ID!, $lines: [CartLineUpdateInput!]!, $country: CountryCode, $language: LanguageCode)
@@ -125,7 +121,6 @@ export const UPDATE_CART_LINES_MUTATION = gql(
[CartFragment]
);
// Remove lines from cart
export const REMOVE_CART_LINES_MUTATION = gql(
`
mutation RemoveCartLines($cartId: ID!, $lineIds: [ID!]!, $country: CountryCode, $language: LanguageCode)
@@ -144,7 +139,6 @@ export const REMOVE_CART_LINES_MUTATION = gql(
[CartFragment]
);
// Apply (or clear) discount codes on the cart
export const UPDATE_CART_DISCOUNT_CODES_MUTATION = gql(
`
mutation UpdateCartDiscountCodes($cartId: ID!, $discountCodes: [String!]!, $country: CountryCode, $language: LanguageCode)
@@ -163,7 +157,6 @@ export const UPDATE_CART_DISCOUNT_CODES_MUTATION = gql(
[CartFragment]
);
// Get cart by ID
export const GET_CART_QUERY = gql(
`
query GetCart($cartId: ID!, $country: CountryCode, $language: LanguageCode)