refactor: resolve related item scrolling issue in related products
This commit is contained in:
@@ -30,12 +30,12 @@ const RelatedProductCards = ({ productId }) => {
|
||||
You may also like
|
||||
</h1>
|
||||
</div>
|
||||
<div className="overflow-x-auto hide-navbar gap-5 flex items-center justify-center">
|
||||
<div className="overflow-x-auto hide-navbar flex items-center justify-start px-4 pb-4 -mx-4 snap-x">
|
||||
{relatedProducts.map((product) => (
|
||||
<Link href={`/products/${product.id}`} key={product.id}>
|
||||
<div
|
||||
key={product.id}
|
||||
className="relative bg-[#EDE8E0] overflow-hidden sm:h-[350px] sm:w-[300px] "
|
||||
className="relative bg-[#EDE8E0] overflow-hidden sm:h-[350px] sm:w-[300px] flex-shrink-0 mx-3 snap-center"
|
||||
>
|
||||
<div className="absolute top-0 left-0 bg-[#C19A5B] text-white py-1 px-3 rounded-br-lg z-10">
|
||||
Exclusive
|
||||
|
||||
Reference in New Issue
Block a user