diff --git a/package.json b/package.json index bccc1ad..44e2c77 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "react-intersection-observer": "^9.15.1", "react-toastify": "^11.0.3", "swiper": "^11.2.2", - "tailwind-merge": "^3.0.2" + "tailwind-merge": "^3.0.2", + "yet-another-react-lightbox": "^3.21.7" }, "devDependencies": { "@eslint/eslintrc": "^3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2af746b..893af80 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,6 +53,9 @@ dependencies: tailwind-merge: specifier: ^3.0.2 version: 3.0.2 + yet-another-react-lightbox: + specifier: ^3.21.7 + version: 3.21.7(react-dom@19.0.0)(react@19.0.0) devDependencies: '@eslint/eslintrc': @@ -3500,6 +3503,17 @@ packages: hasBin: true dev: true + /yet-another-react-lightbox@3.21.7(react-dom@19.0.0)(react@19.0.0): + resolution: {integrity: sha512-dcdokNuCIl92f0Vl+uzeKULnQhztIGpoZFUMvtVNUPmtwsQWpqWufeieDPeg9JtFyVCcbj4vYw3V00DS0QNoWA==} + engines: {node: '>=14'} + peerDependencies: + react: '>=16.8.0' + react-dom: '>=16.8.0' + dependencies: + react: 19.0.0 + react-dom: 19.0.0(react@19.0.0) + dev: false + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} diff --git a/src/app/[locale]/product/[slug]/page.jsx b/src/app/[locale]/product/[slug]/page.jsx index c75732d..42bd933 100644 --- a/src/app/[locale]/product/[slug]/page.jsx +++ b/src/app/[locale]/product/[slug]/page.jsx @@ -1,11 +1,11 @@ -import { ChevronRight, Home } from "lucide-react"; + +import { ArrowRight, Award, Boxes, CheckCircle2, ChevronRight, Link as LinkIcon, MessageSquare, ShieldCheck, Ship } from "lucide-react"; import { getLocale, getMessages } from "next-intl/server"; +import Image from "next/image"; import Link from "next/link"; import { notFound } from "next/navigation"; -import ColorAvg from "src/components/ColorAvg"; -import ProductDescription from "src/components/Product/ProductDescription"; -import ProductGallery from "src/components/Product/ProductGallery"; -import ProductInfo from "src/components/Product/ProductInfo"; +import BackgroundColor from "src/components/BackgroundColor"; +import { ProductGallery } from "src/components/Gallery"; import ProductProperties from "src/components/Product/ProductProperties"; import ProductRelated from "src/components/Product/ProductRelated"; import graphql from "src/utils/graphql"; @@ -47,6 +47,16 @@ query Products($locale: I18NLocaleCode, $slug: String!) { slug discount showPrice + properties { + id + key + value + } + subcategories { + title + documentId + slug + } seo { id metaTitle @@ -74,16 +84,7 @@ query Products($locale: I18NLocaleCode, $slug: String!) { } } } - properties { - id - key - value - } - subcategories { - title - documentId - slug - } + } } @@ -131,6 +132,8 @@ query Products($locale:I18NLocaleCode,$slug:String!) { } } ` + + export async function generateMetadata({ params }) { const { locale, slug } = await params; @@ -203,6 +206,23 @@ const getProduct = async (slug) => { }); return products[0]; }; +const features = [ + { + icon: Award, + title: "Certified Product", + description: "Meets international quality standards" + }, + { + icon: Ship, + title: "Bulk Shipping", + description: "Efficient worldwide delivery solutions" + }, + { + icon: ShieldCheck, + title: "Quality Assured", + description: "Rigorous testing at every stage" + } +]; export default async function ProductPage({ params }) { const { slug } = await params @@ -213,67 +233,172 @@ export default async function ProductPage({ params }) { } const locale = await getLocale(); const t = await getMessages({ locale }); - + return ( -
{feature.description}
+Fill out the form below for pricing and more information
+ +salam