fix: Add promoted item to cart

This commit is contained in:
Sol Irvine
2023-09-01 14:54:27 -07:00
parent bd4cabd16c
commit 725a43505a
18 changed files with 167 additions and 101 deletions

View File

@@ -2,7 +2,8 @@ import Footer from 'components/layout/footer';
import { SupportedLocale } from 'components/layout/navbar/language-control';
import Navbar from 'components/layout/navbar';
import { getCart } from 'lib/shopify';
import { getCart, getProduct } from 'lib/shopify';
import { Product } from 'lib/shopify/types';
import { cookies } from 'next/headers';
import { Suspense } from 'react';
import Disclosures from './disclosures';
@@ -32,9 +33,14 @@ export default async function DisclosuresPage({
cart = await getCart(cartId);
}
const promotedItem: Product | undefined = await getProduct({
handle: 'gift-bag-and-postcard-set',
language: locale?.toUpperCase()
});
return (
<div>
<Navbar cart={cart} locale={locale} compact />
<Navbar cart={cart} locale={locale} compact promotedItem={promotedItem} />
<div className="py-24 md:py-48">
<Disclosures />
</div>