diff --git a/package.json b/package.json index 4c468ad..bccc1ad 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "p": "git pull && yarn install && yarn build && pm2 restart next" }, "dependencies": { + "clsx": "^2.1.1", "embla-carousel-autoplay": "^8.5.2", "embla-carousel-react": "^8.5.2", "fast-average-color": "^9.4.0", @@ -23,7 +24,8 @@ "react-dom": "^19.0.0", "react-intersection-observer": "^9.15.1", "react-toastify": "^11.0.3", - "swiper": "^11.2.2" + "swiper": "^11.2.2", + "tailwind-merge": "^3.0.2" }, "devDependencies": { "@eslint/eslintrc": "^3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 01810aa..2af746b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false dependencies: + clsx: + specifier: ^2.1.1 + version: 2.1.1 embla-carousel-autoplay: specifier: ^8.5.2 version: 8.5.2(embla-carousel@8.5.2) @@ -47,6 +50,9 @@ dependencies: swiper: specifier: ^11.2.2 version: 11.2.4 + tailwind-merge: + specifier: ^3.0.2 + version: 3.0.2 devDependencies: '@eslint/eslintrc': @@ -3223,6 +3229,10 @@ packages: engines: {node: '>= 4.7.0'} dev: false + /tailwind-merge@3.0.2: + resolution: {integrity: sha512-l7z+OYZ7mu3DTqrL88RiKrKIqO3NcpEO8V/Od04bNpvk0kiIFndGEoqfuzvj4yuhRkHKjRkII2z+KS2HfPcSxw==} + dev: false + /tailwindcss@3.4.17: resolution: {integrity: sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==} engines: {node: '>=14.0.0'} diff --git a/public/images/construction.jpg b/public/images/construction.jpg new file mode 100644 index 0000000..2eca962 Binary files /dev/null and b/public/images/construction.jpg differ diff --git a/public/images/feed.jpg b/public/images/feed.jpg new file mode 100644 index 0000000..6d04857 Binary files /dev/null and b/public/images/feed.jpg differ diff --git a/public/images/fmcg.jpg b/public/images/fmcg.jpg new file mode 100644 index 0000000..cbc28f8 Binary files /dev/null and b/public/images/fmcg.jpg differ diff --git a/src/app/[locale]/product/[slug]/page.jsx b/src/app/[locale]/product/[slug]/page.jsx index b857084..0e63395 100644 --- a/src/app/[locale]/product/[slug]/page.jsx +++ b/src/app/[locale]/product/[slug]/page.jsx @@ -2,6 +2,7 @@ import { ChevronRight, Home } from "lucide-react"; import { getLocale, getMessages } from "next-intl/server"; 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"; @@ -10,7 +11,7 @@ import ProductRelated from "src/components/Product/ProductRelated"; import graphql from "src/utils/graphql"; const gql = ` - query Products($locale: I18NLocaleCode, $slug: String!) { +query Products($locale: I18NLocaleCode, $slug: String!) { products(filters: { slug: { eqi: $slug } }, locale: $locale) { documentId title @@ -37,6 +38,11 @@ const gql = ` url } slug + subcategories { + title + documentId + slug + } } slug discount @@ -73,9 +79,16 @@ const gql = ` key value } + subcategories { + title + documentId + slug + } } } + + `; const gql_static = ` query Products($locale:I18NLocaleCode,$start:Int,$limit:Int) { @@ -200,10 +213,10 @@ export default async function ProductPage({ params }) { } const locale = await getLocale(); const t = await getMessages({ locale }); - console.log(t) + return ( -
{t("description.0")}
+salam