mirror of
https://github.com/vercel/commerce.git
synced 2025-06-07 08:46:58 +00:00
update the recommended product squares on the product page to match the product square on the search page
This commit is contained in:
parent
e9a26c2935
commit
d252c6c014
@ -108,14 +108,16 @@ async function RelatedProducts({ id }: { id: string }) {
|
||||
<Grid className="grid-cols-2 lg:grid-cols-5">
|
||||
{relatedProducts.map((product) => {
|
||||
return (
|
||||
<Grid.Item key={product.id} className="animate-fadeIn">
|
||||
<Link
|
||||
aria-label={product.title}
|
||||
className="border-gay-300 group relative block aspect-square overflow-hidden border bg-gray-50"
|
||||
href={`/product/${product.handle}`}
|
||||
>
|
||||
<Grid.Item key={product.handle} className="animate-fadeIn">
|
||||
<Link className="h-full w-full" href={`/product/${product.handle}`}>
|
||||
<GridTileImage
|
||||
alt={product.title}
|
||||
labels={{
|
||||
isSmall: true,
|
||||
title: product.title,
|
||||
amount: product.priceRange.maxVariantPrice.amount,
|
||||
currencyCode: product.priceRange.maxVariantPrice.currencyCode
|
||||
}}
|
||||
src={product.featuredImage.url}
|
||||
width={600}
|
||||
height={600}
|
||||
|
@ -54,7 +54,7 @@ export default function CartButton({
|
||||
onClick={() => {
|
||||
setCartIsOpen(true);
|
||||
}}
|
||||
className="relative top-0 right-0"
|
||||
className="relative right-0 top-0"
|
||||
data-testid="open-cart"
|
||||
>
|
||||
<CartIcon quantity={cart.totalQuantity} />
|
||||
|
@ -48,7 +48,7 @@ export function GridTileImage({
|
||||
/>
|
||||
) : null}
|
||||
{labels ? (
|
||||
<div className="absolute top-0 left-0 w-3/4 text-black dark:text-white">
|
||||
<div className="absolute left-0 top-0 w-3/4 text-black dark:text-white">
|
||||
<h3
|
||||
data-testid="product-name"
|
||||
className={clsx(
|
||||
|
@ -44,7 +44,7 @@ export default async function Footer() {
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col items-center justify-between space-y-4 pt-6 pb-10 text-sm md:flex-row">
|
||||
<div className="flex flex-col items-center justify-between space-y-4 pb-10 pt-6 text-sm md:flex-row">
|
||||
<p>© 2023 {SITE_NAME}. All rights reserved.</p>
|
||||
<div className="flex items-center text-sm text-white dark:text-black">
|
||||
<span className="text-black dark:text-white">Created by</span>
|
||||
|
@ -32,9 +32,9 @@ export default function Search() {
|
||||
placeholder="Search for products..."
|
||||
autoComplete="off"
|
||||
defaultValue={searchParams?.get('q') || ''}
|
||||
className="w-full py-2 px-4 text-black dark:bg-black dark:text-gray-100"
|
||||
className="w-full px-4 py-2 text-black dark:bg-black dark:text-gray-100"
|
||||
/>
|
||||
<div className="absolute top-0 right-0 mr-3 flex h-full items-center">
|
||||
<div className="absolute right-0 top-0 mr-3 flex h-full items-center">
|
||||
<SearchIcon className="h-5" />
|
||||
</div>
|
||||
</form>
|
||||
|
1644
pnpm-lock.yaml
generated
1644
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user