mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
fix: update PLP UI
This commit is contained in:
@@ -175,6 +175,7 @@ const reshapeCollection = (collection: ShopifyCollection): Collection | undefine
|
||||
return {
|
||||
...collection,
|
||||
helpfulLinks: parseMetaFieldValue<string[]>(collection.helpfulLinks),
|
||||
helpfulLinksTop: parseMetaFieldValue<string[]>(collection.helpfulLinksTop),
|
||||
path: `/search/${collection.handle}`
|
||||
};
|
||||
};
|
||||
@@ -530,7 +531,8 @@ export async function getCollections(): Promise<Collection[]> {
|
||||
},
|
||||
path: '/search',
|
||||
updatedAt: new Date().toISOString(),
|
||||
helpfulLinks: null
|
||||
helpfulLinks: null,
|
||||
helpfulLinksTop: null
|
||||
},
|
||||
// Filter out the `hidden` collections.
|
||||
// Collections that start with `hidden-*` need to be hidden on the search page.
|
||||
|
@@ -12,6 +12,9 @@ const collectionFragment = /* GraphQL */ `
|
||||
helpfulLinks: metafield(namespace: "custom", key: "helpful_links") {
|
||||
value
|
||||
}
|
||||
helpfulLinksTop: metafield(namespace: "custom", key: "helpful_links_top") {
|
||||
value
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
${seoFragment}
|
||||
|
@@ -40,9 +40,10 @@ export type CartItem = {
|
||||
addOnProduct?: CartItem & { quantity: number };
|
||||
};
|
||||
|
||||
export type Collection = Omit<ShopifyCollection, 'helpfulLinks'> & {
|
||||
export type Collection = Omit<ShopifyCollection, 'helpfulLinks' | 'helpfulLinksTop'> & {
|
||||
path: string;
|
||||
helpfulLinks: string[] | null;
|
||||
helpfulLinksTop: string[] | null;
|
||||
};
|
||||
|
||||
export type Image = {
|
||||
@@ -225,6 +226,7 @@ export type ShopifyCollection = {
|
||||
seo: SEO;
|
||||
updatedAt: string;
|
||||
helpfulLinks: { value: string } | null;
|
||||
helpfulLinksTop: { value: string } | null;
|
||||
};
|
||||
|
||||
export type ShopifyProduct = {
|
||||
|
Reference in New Issue
Block a user