Skip to content

Commit

Permalink
Disable scrolling to the top when switching between gallery images wi…
Browse files Browse the repository at this point in the history
…th arrow buttons (vercel#1139)
  • Loading branch information
emirmorgan authored Aug 3, 2023
1 parent 9e1388f commit 80bb15a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/product/gallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ export function Gallery({ images }: { images: { src: string; altText: string }[]
aria-label="Previous product image"
href={previousUrl}
className={buttonClassName}
scroll={false}
>
<ArrowLeftIcon className="h-5" />
</Link>
<div className="mx-1 h-6 w-px bg-neutral-500"></div>
<Link aria-label="Next product image" href={nextUrl} className={buttonClassName}>
<Link
aria-label="Next product image"
href={nextUrl}
className={buttonClassName}
scroll={false}
>
<ArrowRightIcon className="h-5" />
</Link>
</div>
Expand Down

0 comments on commit 80bb15a

Please sign in to comment.