Compare commits
No commits in common. "a59473053568a7646a3b7ff593df7026a86207c6" and "67e84dbfa2aa6e7b3dd4b5e7f0ba78668f6f89d9" have entirely different histories.
a594730535
...
67e84dbfa2
|
@ -217,6 +217,8 @@ export default async function ProductPage({ params }) {
|
||||||
return (
|
return (
|
||||||
<div className="max-w-screen-xl mx-auto px-4 py-8 ">
|
<div className="max-w-screen-xl mx-auto px-4 py-8 ">
|
||||||
{/* <ColorAvg image={product.brand.image.url}/> */}
|
{/* <ColorAvg image={product.brand.image.url}/> */}
|
||||||
|
|
||||||
|
|
||||||
<div className="flex flex-col lg:flex-row gap-8 items-center lg:items-start">
|
<div className="flex flex-col lg:flex-row gap-8 items-center lg:items-start">
|
||||||
<ProductGallery images={product.images} />
|
<ProductGallery images={product.images} />
|
||||||
<div className="flex flex-col gap-4 w-full ">
|
<div className="flex flex-col gap-4 w-full ">
|
||||||
|
@ -225,6 +227,8 @@ export default async function ProductPage({ params }) {
|
||||||
<Link href="/" className=" underline inline-flex gap-2">
|
<Link href="/" className=" underline inline-flex gap-2">
|
||||||
<Home />
|
<Home />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
product?.category?.slug &&
|
product?.category?.slug &&
|
||||||
<>
|
<>
|
||||||
|
@ -262,6 +266,7 @@ export default async function ProductPage({ params }) {
|
||||||
subcategories={product.subcategories}
|
subcategories={product.subcategories}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default function ProductGallery({ images }) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 grid grid-cols-4 gap-1">
|
<div className="mt-4 grid grid-cols-4 gap-1">
|
||||||
{images.slice(0, 4).map((image) => (
|
{images.slice(0, 4).map((image, index) => (
|
||||||
<Image
|
<Image
|
||||||
key={image.documentId}
|
key={image.documentId}
|
||||||
src={image.url || "/placeholder.svg"}
|
src={image.url || "/placeholder.svg"}
|
||||||
|
@ -76,7 +76,7 @@ export default function ProductGallery({ images }) {
|
||||||
<div className="relative max-w-4xl w-full">
|
<div className="relative max-w-4xl w-full">
|
||||||
{/* Close Button */}
|
{/* Close Button */}
|
||||||
<button
|
<button
|
||||||
className="absolute top-4 right-4 p-2 rounded-full text-white hover:bg-gray-700 transition-colors bg-gray-400 shadow-lg"
|
className="absolute top-4 right-4 p-2 rounded-full text-white hover:bg-gray-700 transition-colors"
|
||||||
onClick={closeLightbox}
|
onClick={closeLightbox}
|
||||||
>
|
>
|
||||||
<X className="h-6 w-6" />
|
<X className="h-6 w-6" />
|
||||||
|
@ -93,7 +93,7 @@ export default function ProductGallery({ images }) {
|
||||||
|
|
||||||
{/* Previous Button */}
|
{/* Previous Button */}
|
||||||
<button
|
<button
|
||||||
className="absolute top-1/2 left-4 transform -translate-y-1/2 p-2 rounded-full text-white hover:bg-gray-700 transition-colors bg-gray-400 shadow-lg"
|
className="absolute top-1/2 left-4 transform -translate-y-1/2 p-2 rounded-full text-white hover:bg-gray-700 transition-colors"
|
||||||
onClick={prevImage}
|
onClick={prevImage}
|
||||||
>
|
>
|
||||||
<ChevronLeft className="h-8 w-8" />
|
<ChevronLeft className="h-8 w-8" />
|
||||||
|
@ -101,7 +101,7 @@ export default function ProductGallery({ images }) {
|
||||||
|
|
||||||
{/* Next Button */}
|
{/* Next Button */}
|
||||||
<button
|
<button
|
||||||
className="absolute top-1/2 right-4 transform -translate-y-1/2 p-2 rounded-full text-white hover:bg-gray-700 transition-colors bg-gray-400 shadow-lg"
|
className="absolute top-1/2 right-4 transform -translate-y-1/2 p-2 rounded-full text-white hover:bg-gray-700 transition-colors"
|
||||||
onClick={nextImage}
|
onClick={nextImage}
|
||||||
>
|
>
|
||||||
<ChevronRight className="h-8 w-8" />
|
<ChevronRight className="h-8 w-8" />
|
||||||
|
|
|
@ -47,7 +47,6 @@ query Products_connection(
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
locale: $locale
|
locale: $locale
|
||||||
sort: ["order:asc"]
|
|
||||||
) {
|
) {
|
||||||
nodes {
|
nodes {
|
||||||
documentId
|
documentId
|
||||||
|
@ -85,7 +84,6 @@ query Products_connection(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
||||||
|
@ -134,7 +132,7 @@ const ProductsListingPage = () => {
|
||||||
getProducts(category)
|
getProducts(category)
|
||||||
}, [searchParams])
|
}, [searchParams])
|
||||||
|
|
||||||
|
console.log("products", products)
|
||||||
const t = useTranslations("PLP")
|
const t = useTranslations("PLP")
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in New Issue