Fixes cart item button layout shift (#971)

This commit is contained in:
Michael Novotny
2023-04-18 12:08:18 -05:00
committed by GitHub
parent fd9450aecb
commit e9a26c2935
9 changed files with 159 additions and 130 deletions

View File

@@ -33,6 +33,10 @@ const cartFragment = /* GraphQL */ `
... on ProductVariant {
id
title
selectedOptions {
name
value
}
product {
...product
}

View File

@@ -44,8 +44,8 @@ import {
ShopifyUpdateCartOperation
} from './types';
const domain = process.env.SHOPIFY_STORE_DOMAIN!;
const endpoint = process.env.SHOPIFY_STORE_DOMAIN! + SHOPIFY_GRAPHQL_API_ENDPOINT;
const domain = `https://${process.env.SHOPIFY_STORE_DOMAIN!}`;
const endpoint = `${domain}${SHOPIFY_GRAPHQL_API_ENDPOINT}`;
const key = process.env.SHOPIFY_STOREFRONT_ACCESS_TOKEN!;
type ExtractVariables<T> = T extends { variables: object } ? T['variables'] : never;

View File

@@ -21,6 +21,10 @@ export type CartItem = {
merchandise: {
id: string;
title: string;
selectedOptions: {
name: string;
value: string;
}[];
product: Product;
};
};