-
@@ -420,15 +429,23 @@ const Navbar = ({ theme }) => {
CTX.setBottomSheetCart(true)}
+ onClick={() => CTX.setBottomSheetCartOpen(true)}
>
-
-
+
+ {cart?.length > 0 && (
+
+ )}
+
+
>
)}
>
diff --git a/components/TimerDown/TimerDown.jsx b/components/TimerDown/TimerDown.jsx
index bfdfd97..0704450 100644
--- a/components/TimerDown/TimerDown.jsx
+++ b/components/TimerDown/TimerDown.jsx
@@ -4,7 +4,7 @@ import Link from "next/link";
import PersianNumber from "plugins/PersianNumber";
const TimerDown = () => {
- const targetTimestamp = 1704170967 * 1000; // Convert to milliseconds
+ const targetTimestamp = 1707629566 * 1000; // Convert to milliseconds
const [timeRemaining, setTimeRemaining] = useState({
days: 0,
diff --git a/next.config.js b/next.config.js
index 767719f..51f61fb 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,4 +1,9 @@
/** @type {import('next').NextConfig} */
-const nextConfig = {}
+const nextConfig = {
+ reactStrictMode: false, // React Strict Mode is off
+ images: {
+ domains: ["storage.vesmook.com"],
+ },
+};
-module.exports = nextConfig
+module.exports = nextConfig;
diff --git a/plugins/Gallery/page.jsx b/plugins/Gallery/page.jsx
index 26e3251..251cd12 100644
--- a/plugins/Gallery/page.jsx
+++ b/plugins/Gallery/page.jsx
@@ -7,12 +7,29 @@ import p3 from "../../public/images/product/3.png";
import p4 from "../../public/images/product/4.png";
import Image from "next/image";
-const GalleryBox = () => {
+const GalleryBox = ({ file }) => {
+ console.log(file && file[0]?.fileLocation);
return (
-
+ {!!file ? (
+
+ ) : (
+
+ {/* */}
+
+ )}
diff --git a/plugins/bottomSheet/BottomSheetCart.jsx b/plugins/bottomSheet/BottomSheetCart.jsx
index a4c4945..170c6e9 100644
--- a/plugins/bottomSheet/BottomSheetCart.jsx
+++ b/plugins/bottomSheet/BottomSheetCart.jsx
@@ -1,23 +1,58 @@
"use client";
+import CardCart from "@comp/Cards/CardCart/page";
import AppContext from "@ctx/AppContext";
+import Link from "next/link";
+import PersianNumber from "plugins/PersianNumber";
import React, { useContext } from "react";
import { BottomSheet } from "react-spring-bottom-sheet";
import { toast } from "react-toastify";
const BottomSheetCart = (props) => {
const CTX = useContext(AppContext);
+ const cart = CTX.state.cart;
return (
CTX.setBottomSheetCart(false)}
+ open={CTX.state.bottomSheetCartOpen}
+ onDismiss={() => CTX.setBottomSheetCartOpen(false)}
+ className={"z-50 relative"}
>
-
-
افزودن نقش جدید
+
+
+
+ محصول موجود در سبد
+
+
+ {/*
*/}
+
+ {cart.map((e) => (
+
+ ))}
+
-
+
+ {/*
+
+ جمع کل :
+
+ تومان
+
+
*/}
+
+
+
+
);
};
diff --git a/plugins/bottomSheet/BottomSheetDiscount.jsx b/plugins/bottomSheet/BottomSheetDiscount.jsx
new file mode 100644
index 0000000..f5eb7da
--- /dev/null
+++ b/plugins/bottomSheet/BottomSheetDiscount.jsx
@@ -0,0 +1,41 @@
+"use client";
+
+import CardCart from "@comp/Cards/CardCart/page";
+import AppContext from "@ctx/AppContext";
+import Link from "next/link";
+import PersianNumber from "plugins/PersianNumber";
+import React, { useContext } from "react";
+import { BottomSheet } from "react-spring-bottom-sheet";
+import { toast } from "react-toastify";
+
+const BottomSheetDiscount = (props) => {
+ const CTX = useContext(AppContext);
+ const cart = CTX.state.cart;
+
+ return (
+
CTX.setBottomSheetDiscountOpen(false)}
+ className={"z-50 relative"}
+ >
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default BottomSheetDiscount;
diff --git a/plugins/bottomSheet/BottomSheetFilter.jsx b/plugins/bottomSheet/BottomSheetFilter.jsx
new file mode 100644
index 0000000..a3c2ba0
--- /dev/null
+++ b/plugins/bottomSheet/BottomSheetFilter.jsx
@@ -0,0 +1,40 @@
+"use client";
+
+import CardCart from "@comp/Cards/CardCart/page";
+import FilterCategory from "@comp/Category/FilterCategory/page";
+import AppContext from "@ctx/AppContext";
+import PersianNumber from "plugins/PersianNumber";
+import React, { useContext } from "react";
+import { BottomSheet } from "react-spring-bottom-sheet";
+import { toast } from "react-toastify";
+
+const BottomSheetFilter = ({ data }) => {
+ const CTX = useContext(AppContext);
+ const cart = CTX.state.cart;
+
+ return (
+
CTX.setBottomSheetFilterOpen(false)}
+ className={"z-50 relative"}
+ >
+
+
+
+
+ );
+};
+
+export default BottomSheetFilter;
diff --git a/public/images/ap.png b/public/images/ap.png
new file mode 100644
index 0000000..625ceb7
Binary files /dev/null and b/public/images/ap.png differ
diff --git a/public/images/divider.png b/public/images/divider.png
index 38f6b26..068f7d6 100644
Binary files a/public/images/divider.png and b/public/images/divider.png differ
diff --git a/public/images/zarin.png b/public/images/zarin.png
new file mode 100644
index 0000000..ba96d65
Binary files /dev/null and b/public/images/zarin.png differ
diff --git a/src/app/about-us/page.jsx b/src/app/about-us/page.jsx
new file mode 100644
index 0000000..b293d1a
--- /dev/null
+++ b/src/app/about-us/page.jsx
@@ -0,0 +1,173 @@
+import Footer from "@comp/Footer/page";
+import Navbar from "@comp/Navbar/page";
+import PersianNumber from "plugins/PersianNumber";
+import React from "react";
+
+const page = () => {
+ const number = "02188195164";
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+ وسمه ، بن ماضی زیبایی
+
+
+
+ وسمه تهعد داره تجربه خرید لوازم آرایشی و بهداشتی رو متحول کنه.
+ این تحول میتونه برای مشتری احساس قسمتی از خانواده وسمه بودن رو
+ داشته باشه. وسمه با برطرف کردن دغدغههای خرید لوازم آرایشی و
+ بهداشتی به ساختن لایف استایل شخصی خانمهای ایرانی کمک میکنه و
+ زندگی راحتتری پیش روی مشتریانش قرار میده. از سال 1400 ما تمام
+ انرژیمون رو به کار گرفتیم تا با تمرکز برکیفیت کالا، سرعت ارسال و
+ قیمت کالا ، نیاز افراد رو برطرف کنیم و تجربه جدیدی از لذت خرید
+ به وجود بیاریم.
+
+
+
+
+
+
+
+
+ جوایز و تقدیر
+
+
+
+ ما مفتخریم که به خاطر کاری که هر روز از طرف مشتریان،
+ کارمندان و جوامع خود انجام می دهیم، مورد تقدیر قرار می
+ گیریم.
+
+
+
+
+
+
+
+
+
+
+ موقعیت های ما
+
+
+
+ در حالی که مواضع ما به دقت مورد بررسی قرار می گیرد و
+ عمیقاً حفظ می شود، فضای زیادی برای بحث سالم و نظرات متفاوت
+ وجود دارد. ما امیدواریم که شفاف بودن در مورد مواضع ما مفید
+ باشد.
+
+
+
+
+
+
+
+
+
+
+ سیاست عمومی{" "}
+
+
+
+ ما با سیاستگذاران در مورد طیف وسیعی از موضوعاتی که برای
+ مشتریان و کارمندان ما مهم است، تعامل داریم. درباره نظرات
+ ما در مورد مسائل جاری سیاست بیشتر بیاموزید.
+
+
+
+
+
+
+
+
+
+
+ اصول رهبری
+
+
+
+ اصول رهبری ما چیزی فراتر از دیوارکوب های الهام بخش است.
+ این 16 اصل، هر روز بحث ها و تصمیمات ما را هدایت می کن
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ موقعیت های ما در وسمه
+
+
+ فروشگاه ما به عنوان یک منبع قابل اعتماد برای خرید لوازم آرایشی و
+ زیبایی، به شفافیت و صداقت ارزشمندی میدهد. ما به دقت مواضع و
+ ارزشهایمان را تعیین کردهایم و همواره به دنبال بهبود و توسعه آنها
+ هستیم. همچنین، در فضای ما، به نظرات و دیدگاههای مختلف احترام
+ میگذاریم و فضایی را برای بحث سالم و تبادل نظر فراهم میکنیم. با
+ ایجاد این امکان، ما امیدواریم که از تنوع نظرات و دیدگاهها بهرهمند
+ شویم و از این طریق، به تصمیمات بهتری برای رشد و پیشرفت فروشگاهمان
+ برسیم. با شفافیت، احترام به نظرات متفاوت و توجه به مواضع ما، ما به
+ ایجاد یک جامعه پویا و پایدار از مشتریان و مشتریان آیندهی خود تلاش
+ میکنیم
+
+
+
+ جوایز و تقدیر در وسمه
+
+
+ ما در "وسمه" مفتخریم که به خاطر کاری که هر روز از طرف مشتریان،
+ کارمندان و جوامع خود انجام میدهیم، مورد تقدیر قرار میگیریم. این
+ تقدیر و اعترافها، نشان از ارزشی است که ما برای ارتباط مستمر و
+ صادقانه با همهی اعضای جامعهی ما قائل هستیم. همهی تلاش ما در
+ "وسمه" به منظور ارائهی بهترین تجربهی ممکن برای مشتریان عزیزمان
+ است. از انتخاب محصولات با کیفیت تا ارائهی خدمات استثنایی، ما به دقت
+ به نیازها و خواستههای شما توجه میکنیم تا اطمینان حاصل شود که هرگز
+ از "وسمه" ناراضی نخواهید شد. با تمام وجود و انگیزهی بیپایان، ما به
+ ارتقاء محصولات و خدماتمان ادامه میدهیم تا همیشه بهترین را برای شما
+ فراهم کنیم. وعدهی ما این است که در "وسمه" همیشه یک محیط پذیرایی،
+ احترام و نوآوری برای شما وجود داشته باشد
+
+
+
+
+
+ >
+ );
+};
+
+export default page;
diff --git a/src/app/cart/checkout/page.jsx b/src/app/cart/checkout/page.jsx
new file mode 100644
index 0000000..b4fb4ab
--- /dev/null
+++ b/src/app/cart/checkout/page.jsx
@@ -0,0 +1,426 @@
+"use client";
+import NavBarDownCart from "@comp/Carts/component/NavBarDownCart/page";
+import Navbar from "@comp/Navbar/page";
+import PersianNumber from "plugins/PersianNumber";
+import React, { useContext, useEffect } from "react";
+
+import zarin from "@img/zarin.png";
+import ap from "@img/ap.png";
+import Image from "next/image";
+import AppContext from "@ctx/AppContext";
+import BottomSheetDiscount from "plugins/bottomSheet/BottomSheetDiscount";
+import { useRouter } from "next/navigation";
+
+const page = () => {
+ const CTX = useContext(AppContext);
+ const router = useRouter();
+ const checkOutData = CTX.state.checkOutData;
+
+ console.log(checkOutData);
+
+ useEffect(() => {
+ if (CTX.state.checkOutData.length <= 0) {
+ router.push("/cart");
+ }
+ }, []);
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+ آدرس شما{" "}
+
+
+ {" "}
+ تهران ، نارمک ، فلکه پنجم پلاک 5 ، واحد 22
+
+
+
+
+
+
زمان و نحوه ارسال
+
+
+
+
+
+ سریع ترین زمان ارسال
+
+
+
+
+
+
+
+
+
+
+ ارسال با پیک (فقط محدوده تهران){" "}
+
+
+ {" "}
+
+ ساعت
+ |
+ هزینه ارسال
+
+ هزار تومان
+
+
+
+
+
+
+
+
+ پست عادی{" "}
+
+
+ {" "}
+ حداکثر
+
+ روز کاری
+ |
+ هزینه ارسال
+
+ هزار تومان
+
+
+
+
+
+
+
+
+ پست سفارشی{" "}
+
+
+ {" "}
+ هزینه ارسال
+
+ هزار تومان
+
+
+
+
+
+
+
+
+ پست پیشتاز{" "}
+
+
+ {" "}
+ حداکثر
+
+ روز کاری
+ | هزینه ارسال
+
+ هزار تومان
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ پرداخت آنلاین
+
+
زرین پال
+
+
+
+
+
+
+
+
+
+ پرداخت آنلاین
+
+
آسان پرداخت
+
+
+
CTX.setBottomSheetDiscountOpen(true)}
+ >
+
+
+
+
+ افزودن کد تخفیف{" "}
+
+
+ کد تخفیف خود را وارد کنید
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
قیمت
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
تخفیف محصول
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
هزینه بسته بندی
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
هزینه ارسال
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
+ قابل پرداخت
+
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
+
console.log("D")}
+ />
+
+
+
+ >
+ );
+};
+
+export default page;
diff --git a/src/app/cart/page.jsx b/src/app/cart/page.jsx
new file mode 100644
index 0000000..7f84811
--- /dev/null
+++ b/src/app/cart/page.jsx
@@ -0,0 +1,191 @@
+"use client";
+import CardCart from "@comp/Cards/CardCart/page";
+import NavBarDownCart from "@comp/Carts/component/NavBarDownCart/page";
+import Navbar from "@comp/Navbar/page";
+import AppContext from "@ctx/AppContext";
+import Link from "next/link";
+import { useRouter } from "next/navigation";
+import Chapar from "plugins/Chapar";
+import PersianNumber from "plugins/PersianNumber";
+import React, { useContext, useEffect } from "react";
+import { toast } from "react-toastify";
+
+const page = () => {
+ const CTX = useContext(AppContext);
+ const router = useRouter();
+ const cart = CTX.state.cart;
+
+ const calculateTotalCost = cart.reduce(
+ (total, item) => total + parseInt(item.cost) * item.count,
+ 0
+ );
+
+ const calculateTotalCostWithDiscount = cart.reduce(
+ (total, item) => total + parseInt(item.costWithDiscount) * item.count,
+ 0
+ );
+
+ // const calculateTotalCostWithDiscount = cart.reduce((total, item) => {
+ // // Check if costWithDiscount is defined and a valid number
+ // if (
+ // typeof item.costWithDiscount === "number" &&
+ // !isNaN(item.costWithDiscount)
+ // ) {
+ // // If costWithDiscount is defined and valid, include it in the calculation
+ // return total + item.costWithDiscount * item.count;
+ // } else {
+ // // If costWithDiscount is not defined or not a valid number, use regular cost
+ // return total + item.cost * item.count;
+ // }
+ // }, 0);
+
+ const handleGoCheckOut = async () => {
+ // Check if the user is authorized based on the presence of a token in local storage
+ const token = localStorage.getItem("token");
+
+ if (token) {
+ // If token exists, proceed to checkout
+ const productsToSend = cart.map((item) => ({
+ productId: item.id,
+ count: parseInt(item.count),
+ }));
+ try {
+ const data = await Chapar.post(
+ `${process.env.NEXT_PUBLIC_API_URL}/order/bag/add`,
+
+ JSON.stringify(productsToSend),
+
+ {
+ headers: {
+ Authorization: localStorage.getItem("token"),
+ },
+ }
+ );
+
+ CTX.setCheckOutData(data);
+ } catch ({ error, status }) {
+ toast.error(`${error?.response?.data?.message}`, {
+ position: "bottom-right",
+ closeOnClick: true,
+ });
+ }
+ router.push("/cart/checkout"); // Redirect to the checkout page
+ } else {
+ // If token does not exist, redirect to login
+ router.push("/login"); // Redirect to the login page
+ }
+ };
+
+ useEffect(() => {
+ CTX.setBottomSheetCartOpen(false);
+ }, []);
+
+ return (
+ <>
+
+
+
+
+
محصولات انتخاب شده
+
+
+
+
+
+ {cart?.map((e) => (
+
+ ))}
+
+
+
+
حساب نهایی
+
+ {/*
*/}
+
+
+
+
+
قیمت
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
تخفیف محصول
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
+ قابل پرداخت
+
+
+
+
+
+
+
+ {" "}
+ تومان
+
+
+
+
+
+
+
+
handleGoCheckOut()}
+ />
+
+ >
+ );
+};
+
+export default page;
diff --git a/src/app/categories/[id]/page.jsx b/src/app/categories/[id]/page.jsx
index f736038..beeaca7 100644
--- a/src/app/categories/[id]/page.jsx
+++ b/src/app/categories/[id]/page.jsx
@@ -63,7 +63,19 @@ export default function page({ params }) {
-
+
diff --git a/src/app/contact-us/page.jsx b/src/app/contact-us/page.jsx
new file mode 100644
index 0000000..d7b4f58
--- /dev/null
+++ b/src/app/contact-us/page.jsx
@@ -0,0 +1,247 @@
+import Footer from "@comp/Footer/page";
+import Navbar from "@comp/Navbar/page";
+import PersianNumber from "plugins/PersianNumber";
+import React from "react";
+
+const page = () => {
+ const number = "02188195164";
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+ به خدمات مشتری وسمه خوش آمدید
+
+
+
+ امروز در مورد چه کمکی می خواهید؟ شما میتوانید به سرعت از بسیاری
+ از موارد در اینجا مراقبت کنید، یا در صورت نیاز با ما ارتباط
+ برقرار کنید.
+
+
+
+
+
+
+
+
+
+
+ تحویل، سفارش یا بازگشت
+
+
+
+
+
+
+
+
+ امنیت و حریم خصوصی{" "}
+
+
+
+
+
+
+
+
+ رمز عبور ورود{" "}
+
+
+
+
+
+
+
+
+ پرداخت، شارژ یا کارت هدیه{" "}
+
+
+
+
+
+
+
+
+ پرداخت، شارژ یا کارت هدیه{" "}
+
+
+
{" "}
+
+
+
+
+
+
+
+
+
+ فروشگاه وسمه
+
+
+ اینجا جایی است که زیبایی شما به روشنی معنا پیدا میکند و هر آنچه که
+ برای بهترین نسخه خود نیاز دارید، در دسترس شماست. ما به افتخار اینکه
+ انتخابی برای زیبایی و اعتماد به نفس شما هستیم، بسیار خوشحالیم. در
+ فروشگاه وسمه، ما به دنبال ارائه محصولات با کیفیت و خدماتی استثنایی
+ هستیم تا به شما کمک کنیم تا به بهترین شکل ممکن زندگی کنید. اگر سوالی
+ دارید یا نیاز به راهنمایی دارید، تیم ما همیشه در دسترس است تا به شما
+ کمک کند. با افتخار ما را در فروشگاه "وسمه" به عنوان همراهی شما در
+ مسیر زیبایی و اعتماد به نفس خوش آمدید. با احترام و دوستی، تیم
+ فروشگاه "وسمه
+
+
+
+
+
+
+
+
+
+
+
+
+ تهران، خیابان گاندی جنوبی, خیابان خالد اسلامبولی, پلاک128{" "}
+
{" "}
+
+
+
+
+
+
+ >
+ );
+};
+
+export default page;
diff --git a/src/app/layout.jsx b/src/app/layout.jsx
index b5f5a52..fa46a1c 100644
--- a/src/app/layout.jsx
+++ b/src/app/layout.jsx
@@ -7,8 +7,9 @@ import Chapar from "plugins/Chapar";
import AppContext from "@ctx/AppContext";
import { useEffect, useState } from "react";
import "react-toastify/dist/ReactToastify.css";
-import { ToastContainer } from "react-toastify";
+import { ToastContainer, toast } from "react-toastify";
import Loading from "plugins/Loading/page";
+import "react-spring-bottom-sheet/dist/style.css";
export default function RootLayout({ children }) {
const [cart, setCart] = useState([]);
@@ -17,23 +18,69 @@ export default function RootLayout({ children }) {
const [brands, setBrands] = useState([]);
const [loading, setLoading] = useState(false);
const [closeNavbar, setCloseNavbar] = useState(false);
- const [bottomSheetCart, setBottomSheetCart] = useState(false);
+ const [bottomSheetCartOpen, setBottomSheetCartOpen] = useState(false);
+ const [bottomSheetFilterOpen, setBottomSheetFilterOpen] = useState(false);
+ const [bottomSheetDiscountOpen, setBottomSheetDiscountOpen] = useState(false);
+ const [checkOutData, setCheckOutData] = useState([]);
- const AddItemToCart = (id, persianName, cost) => {
- console.log("persianName", persianName);
+ console.log(navData);
+
+ const AddItemToCart = (
+ id,
+ persianName,
+ cost,
+ costWithDiscount,
+ mainImage,
+ hasDiscount,
+ maxOrderCount
+ ) => {
setCart((prevCart) => {
// Check if the item is already in the cart
const existingItem = prevCart.find((item) => item.id === id);
-
+ let updatedCart;
if (existingItem) {
// If the item is already in the cart, update its count
- return prevCart.map((item) =>
- item.id === id ? { ...item, count: item.count + 1 } : item
- );
+ if (existingItem.count < maxOrderCount) {
+ updatedCart = prevCart.map((item) =>
+ item.id === id ? { ...item, count: item.count + 1 } : item
+ );
+ } else {
+ // Notify user if maxOrderCount is exceeded
+ toast.error(
+ `
+ نمیتوانید بیشتراز
+
+ ${maxOrderCount}
+
+ عدد ثبت کنید `,
+ {
+ position: "bottom-right",
+ closeOnClick: true,
+ }
+ );
+ updatedCart = prevCart;
+ }
} else {
// If the item is not in the cart, add it with a count of 1
- return [...prevCart, { id, count: 1, persianName, cost }];
+ updatedCart = [
+ ...prevCart,
+ {
+ id,
+ count: 1,
+ persianName,
+ cost,
+ costWithDiscount,
+ mainImage,
+ hasDiscount,
+ maxOrderCount,
+ },
+ ];
}
+ // Store the updated cart in local storage
+ localStorage.setItem("cart", JSON.stringify(updatedCart));
+
+ // Return the updated cart
+ return updatedCart;
});
};
@@ -46,12 +93,24 @@ export default function RootLayout({ children }) {
// If the item is already in the cart
if (existingItem.count === 1) {
// If the item count is 1, remove it from the cart
- return prevCart.filter((item) => item.id !== id);
+ const updatedCart = prevCart.filter((item) => item.id !== id);
+
+ // Store the updated cart in local storage
+ localStorage.setItem("cart", JSON.stringify(updatedCart));
+
+ // Return the updated cart
+ return updatedCart;
} else {
// If the item count is greater than 1, update its count
- return prevCart.map((item) =>
+ const updatedCart = prevCart.map((item) =>
item.id === id ? { ...item, count: item.count - 1 } : item
);
+
+ // Store the updated cart in local storage
+ localStorage.setItem("cart", JSON.stringify(updatedCart));
+
+ // Return the updated cart
+ return updatedCart;
}
} else {
// If the item is not in the cart, do nothing
@@ -98,6 +157,11 @@ export default function RootLayout({ children }) {
};
useEffect(() => {
+ const storedCart = localStorage.getItem("cart");
+ if (storedCart) {
+ setCart(JSON.parse(storedCart));
+ }
+
fetchNavData();
}, []);
@@ -111,14 +175,20 @@ export default function RootLayout({ children }) {
loading,
brands,
closeNavbar,
- bottomSheetCart,
+ bottomSheetCartOpen,
+ bottomSheetFilterOpen,
+ bottomSheetDiscountOpen,
+ checkOutData,
},
setCart,
setProducts,
setNavData,
setLoading,
setBrands,
- setBottomSheetCart,
+ setBottomSheetCartOpen,
+ setBottomSheetFilterOpen,
+ setBottomSheetDiscountOpen,
+ setCheckOutData,
AddItemToCart,
RemoveItemFromCart,
fetchNavData,
diff --git a/src/app/page.jsx b/src/app/page.jsx
index 2288fa1..3e5df35 100644
--- a/src/app/page.jsx
+++ b/src/app/page.jsx
@@ -7,19 +7,52 @@ import BetweenSexualSection from "@comp/LandingPage/BetweenSexualSection/page";
import BrandsLogoSection from "@comp/LandingPage/BrandsLogoSection/page";
import BeautySection from "@comp/LandingPage/BeautySection/page";
import HomeSection from "@comp/LandingPage/HomeSection/page";
+import { useEffect, useState } from "react";
export default function Page() {
+ const [specialOfferData, setSpecialOfferData] = useState([]);
+ const [cosmeticData, setCosmeticData] = useState([]);
+ const [HomeCosmeticData, setHomeCosmeticData] = useState([]);
+ const fetchSpecialOffer = async () => {
+ const res = await fetch(
+ `${process.env.NEXT_PUBLIC_API_URL}/product?page=0&specialOffer=true`
+ );
+ const specialOffer = await res.json();
+ setSpecialOfferData(specialOffer);
+ };
+
+ const fetchCosmetic = async () => {
+ const res = await fetch(
+ `${process.env.NEXT_PUBLIC_API_URL}/product?page=0&categoryId=553af942-7a14-4757-9a03-a3ebec6c865a`
+ );
+ const Cosmetic = await res.json();
+ setCosmeticData(Cosmetic);
+ };
+
+ const fetchHomeCosmetic = async () => {
+ const res = await fetch(
+ `${process.env.NEXT_PUBLIC_API_URL}/product?page=0&categoryId=effe5d98-d4b7-47e1-9bfb-4d3c77ab3347`
+ );
+ const HomeCosmetic = await res.json();
+ setHomeCosmeticData(HomeCosmetic);
+ };
+
+ useEffect(() => {
+ fetchSpecialOffer();
+ fetchCosmetic();
+ fetchHomeCosmetic();
+ }, []);
return (
<>
-
+
-
-
+
+
>
);
diff --git a/src/app/products/[id]/page.jsx b/src/app/products/[id]/page.jsx
index b161721..3723a06 100644
--- a/src/app/products/[id]/page.jsx
+++ b/src/app/products/[id]/page.jsx
@@ -28,7 +28,7 @@ const page = ({ params }) => {
-
+
@@ -223,12 +223,8 @@ const page = ({ params }) => {
روش استفاده
-
- لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و
- با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و
- مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی
- تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای
-
+
+
diff --git a/style/globals.css b/style/globals.css
index 8824319..f492c0d 100644
--- a/style/globals.css
+++ b/style/globals.css
@@ -14,6 +14,13 @@
@apply bg-primary-600;
}
+ .btn-outline-primary {
+ @apply border border-primary-500 text-primary-500;
+ }
+ .btn-outline-primary:hover {
+ @apply bg-primary-600 text-white;
+ }
+
.btn-secondary {
@apply bg-secondary-100 text-white;
}
@@ -54,7 +61,7 @@
body {
font-family: KalamehWeb !important;
- background: #eeeeee;
+ background: white;
--toastify-font-family: KalamehWeb !important;
--Chart-defaults-font-family: KalamehWeb !important;
}
@@ -87,6 +94,34 @@ body {
background-size: cover;
}
+.bg-contact-us {
+ background: hsla(201, 100%, 43%, 1);
+
+ background: radial-gradient(
+ circle,
+ hsla(201, 100%, 43%, 1) 36%,
+ hsla(207, 100%, 33%, 1) 100%
+ );
+
+ background: -moz-radial-gradient(
+ circle,
+ hsla(201, 100%, 43%, 1) 36%,
+ hsla(207, 100%, 33%, 1) 100%
+ );
+
+ background: -webkit-radial-gradient(
+ circle,
+ hsla(201, 100%, 43%, 1) 36%,
+ hsla(207, 100%, 33%, 1) 100%
+ );
+
+ filter: progid: DXImageTransform.Microsoft.gradient( startColorstr="#0090DD", endColorstr="#005CA7", GradientType=1 );
+
+ filter: progid: DXImageTransform.Microsoft.gradient( startColorstr="#00A6FF", endColorstr="#0062B3", GradientType=1 );
+ background-position: center;
+ background-size: cover;
+}
+
.bg-navbar {
background: rgba(240, 240, 240, 0.4);
}
diff --git a/tailwind.config.js b/tailwind.config.js
index d6ce4ea..dc0775a 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -13,8 +13,8 @@ module.exports = {
100: "#FFFBE6",
},
primary: {
- 100: "#B9E4C9",
- 200: "#2ab1da57",
+ 100: "#2189a818",
+ 200: "#2189a8ce",
300: "#2ab0daa6",
400: "#279fc4",
500: "#2189A8",