From 7a5bef06226699e31e58af2acba01d1c9b9891ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=AD=D8=B3=DB=8C=D9=86=20=D9=85=D8=B9=D8=B5=D9=88=D9=85?= =?UTF-8?q?=DB=8C=20=D9=BE=D9=88=D8=B1?= Date: Mon, 17 Feb 2025 02:11:47 +0330 Subject: [PATCH] pdp response and check ck editor --- src/app/products/[...id]/page.jsx | 23 ++++++-- src/view/Landing/components/Products.jsx | 10 ++++ src/view/Products/index.jsx | 68 ++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 src/view/Products/index.jsx diff --git a/src/app/products/[...id]/page.jsx b/src/app/products/[...id]/page.jsx index 15115dd..8d8a19a 100644 --- a/src/app/products/[...id]/page.jsx +++ b/src/app/products/[...id]/page.jsx @@ -1,12 +1,25 @@ -import ProductData from "@comp/AppsComponent/ProductData/page"; -import { notFound, redirect } from "next/navigation"; +import Product from "src/view/Products"; + +const page = async ({ params, searchParams }) => { + const data = { + id: 1, + persianName: "Hydrating Cream", + englishName: "Hydrating Cream", + description: + "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptates impedit officia eos quo aliquam soluta iste earum aliquid harum doloremque iure consectetur vel, cumque autem id, numquam quisquam mollitia velit. . Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptates impedit officia eos quo aliquam soluta iste earum aliquid harum doloremque iure consectetur vel, cumque autem id, numquam quisquam mollitia velit. . ", + cost: 250000, + costWithDiscount: 200000, + hasDiscount: true, + discountPercent: 20, + stock: 5, + mainImage: "4", + }; -async function getData(id) { return ( <> ); -} +}; -export default Page; +export default page; diff --git a/src/view/Landing/components/Products.jsx b/src/view/Landing/components/Products.jsx index 5c3190a..64e35cd 100644 --- a/src/view/Landing/components/Products.jsx +++ b/src/view/Landing/components/Products.jsx @@ -1,3 +1,4 @@ +import Link from "next/link"; import React from "react"; import CardNormal from "src/components/Cards/CardNormal/page"; @@ -220,6 +221,15 @@ const Products = () => { ))} + +
+ + + +
); diff --git a/src/view/Products/index.jsx b/src/view/Products/index.jsx new file mode 100644 index 0000000..e9bb8f0 --- /dev/null +++ b/src/view/Products/index.jsx @@ -0,0 +1,68 @@ +import React from "react"; +import test from "../../assets/images/product/1.png"; +import Navbar from "src/components/NavBar"; +import Image from "next/image"; +const Product = ({ data }) => { + const testDataCk = + '

Hydrating Cream - Ultimate Skincare Solution

Discover the power of deep hydration with our premium Hydrating Cream. Designed to nourish and protect your skin, this cream is enriched with essential vitamins and natural extracts.

Why Choose Our Hydrating Cream?

Our formula ensures your skin remains moisturized and rejuvenated throughout the day. It absorbs quickly and leaves no greasy residue, making it perfect for all skin types.

Key Benefits

✔ Restores skins natural glow
✔ Prevents dryness and flakiness
✔ Reduces fine lines and wrinkles
✔ Soothes irritation and redness

How to Use?

Apply a small amount of Hydrating Cream to your face and neck. Gently massage in circular motions until fully absorbed. Use morning and night for best results.

Ingredients

Water, Glycerin, Aloe Vera Extract, Shea Butter, Vitamin E, Hyaluronic Acid, Essential Oils, Antioxidants.

Customer Reviews

⭐⭐⭐⭐⭐ "Absolutely love this cream! My skin feels so soft and refreshed!" - Sarah K.

⭐⭐⭐⭐⭐ "Best moisturizer I’ve ever used. Highly recommended!" - David R.

Frequently Asked Questions

Q: Is this suitable for sensitive skin?
A: Yes! Our formula is dermatologically tested and safe for sensitive skin.

Q: Can I use this under makeup?
A: Absolutely! It creates a perfect base for smooth makeup application.

Final Thoughts

Hydrating Cream is your go-to solution for lasting hydration and healthy skin. Experience the difference with our expertly crafted formula.

Get yours today and say hello to beautifully hydrated skin!

'; + + return ( + <> + + +
+
+
+
+
+ {data.persianName} +
+
+
+
+ +
+
+

{data.englishName}

+

{data.englishName}

+
+ +
+
+

orginal

+
+ +
+

off today

+
+ +
+

no stock

+
+
+ +
+
+

+ {data?.description} +

+
+
+
+
+
+
+
+ + ); +}; + +export default Product;