diff --git a/app/(home)/styles.module.scss b/app/(home)/styles.module.scss
index 6326b3347..ad95522f8 100644
--- a/app/(home)/styles.module.scss
+++ b/app/(home)/styles.module.scss
@@ -1,3 +1,4 @@
.main {
padding: 0 60px;
+ padding-bottom: 364px;
}
diff --git a/components/home/index.js b/components/home/index.js
index 2e4801ba1..a5cad7c39 100644
--- a/components/home/index.js
+++ b/components/home/index.js
@@ -5,8 +5,8 @@ import Image from 'next/image';
import { getCollectionProducts, getMenu } from 'lib/shopify';
-import { PriceRanges } from '/components/price.js';
import styles from './styles.module.scss';
+import { PriceRanges } from '/components/price';
export async function HomeProduct({ product }) {
const typesMenu = await getMenu('types-nav');
@@ -17,23 +17,26 @@ export async function HomeProduct({ product }) {
?.map(col => col?.title)
?.filter(col => types?.includes(col?.toLowerCase()));
- console.log({ collections });
-
return (
+ {/* TODO: optimize srcset (adjusting based on featured status) */}
{product?.title}
- {collections && collections.length > 0 && ( -{`(${collections.join(', ')})`}
- )} +{product?.title}
+ {collections && collections.length > 0 && ( +{`(${collections.join( + ', ' + )})`}
+ )} ++
{availableForSale ? ( isForSale && ( <> <> {onSale && ( - + {formatPriceRange( product?.compareAtPriceRange )}{' '} )} > - {formatPriceRange(product?.priceRange)} + {`${formatPriceRange(product?.priceRange)} ${ + product?.priceRange?.maxVariantPrice?.currencyCode + }`} > ) ) : ( @@ -59,11 +65,6 @@ export const PriceRanges = ({ product }) => { ); }; -export const variantAvailableForSale = variant => - variant?.availableForSale ?? false; -export const variantOnSale = variant => - (variant?.compareAtPrice?.amount ?? 0) > (variant?.price?.amount ?? 0); - export const VariantPrice = ({ variant, quantity }) => { const availableForSale = variantAvailableForSale(variant); const onSale = variantOnSale(variant); diff --git a/components/product/purchase-input.js b/components/product/purchase-input.js index 1d007ce83..8eddb518d 100644 --- a/components/product/purchase-input.js +++ b/components/product/purchase-input.js @@ -9,7 +9,7 @@ import { productHasOptions, productIsForSale, VariantPrice, -} from '/components/price.js'; +} from '/components/price'; export const productVariant = ({ product, selectedOptions }) => { const hasOptions = productHasOptions(product); diff --git a/styles/_typography.scss b/styles/_typography.scss index 5d626ffa3..cfcb5a16c 100644 --- a/styles/_typography.scss +++ b/styles/_typography.scss @@ -26,6 +26,8 @@ font-weight: 400; line-height: 20px; /* 100% */ text-transform: uppercase; + font-variant-numeric: lining-nums tabular-nums slashed-zero; + font-feature-settings: 'case' on; } @mixin body {