mirror of
https://github.com/vercel/commerce.git
synced 2025-05-11 04:07:50 +00:00
refactoring
This commit is contained in:
parent
be65e581f3
commit
86a083d72d
@ -5,7 +5,6 @@ import { GridTileImage } from 'components/grid/tile';
|
||||
import Footer from 'components/layout/footer';
|
||||
import { Gallery } from 'components/product/gallery';
|
||||
import { ProductDescription } from 'components/product/product-description';
|
||||
import { HIDDEN_PRODUCT_TAG } from 'lib/constants';
|
||||
import { getProduct, getProductRecommendations } from 'lib/shopify';
|
||||
import { Image } from 'lib/shopify/types';
|
||||
import Link from 'next/link';
|
||||
@ -21,7 +20,7 @@ export async function generateMetadata({
|
||||
if (!product) return notFound();
|
||||
|
||||
const { url, width, height, altText: alt } = product.featuredImage || {};
|
||||
const indexable = !product.tags.includes(HIDDEN_PRODUCT_TAG);
|
||||
const indexable = product.availableForSale;
|
||||
|
||||
return {
|
||||
title: product.seo.title || product.title,
|
||||
|
@ -26,6 +26,4 @@ export const TAGS = {
|
||||
cart: 'cart'
|
||||
};
|
||||
|
||||
export const HIDDEN_PRODUCT_TAG = 'nextjs-frontend-hidden';
|
||||
export const DEFAULT_OPTION = 'Default Title';
|
||||
export const SHOPIFY_GRAPHQL_API_ENDPOINT = '/api/2023-01/graphql.json';
|
||||
|
Loading…
x
Reference in New Issue
Block a user