refactoring

This commit is contained in:
Kristian Duda 2024-06-28 14:38:13 +02:00
parent be65e581f3
commit 86a083d72d
2 changed files with 1 additions and 4 deletions

View File

@ -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,

View File

@ -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';