diff --git a/.env.production b/.env.production
index 52680c0..bc930c3 100644
--- a/.env.production
+++ b/.env.production
@@ -6,4 +6,4 @@ NEXT_PUBLIC_PUBLIC_URL=https://api.vesmeh.com
NEXT_PUBLIC_API_URL=https://api.vesmeh.com/api
NEXT_PUBLIC_STORAGE_URL=http://storage.vesmeh.com
STORAGE_URL=http://storage.vesmeh.com
-NEXT_PUBLIC_PACKAGE_VERSION=0.3.3
\ No newline at end of file
+NEXT_PUBLIC_PACKAGE_VERSION=0.31.3
\ No newline at end of file
diff --git a/components/AppsComponent/CategoriesData/page.jsx b/components/AppsComponent/CategoriesData/page.jsx
index 840da1a..0c79737 100644
--- a/components/AppsComponent/CategoriesData/page.jsx
+++ b/components/AppsComponent/CategoriesData/page.jsx
@@ -39,13 +39,18 @@ export default function CategoriesData({ params, products }) {
);
const stopProducts = CTX.state.stopProducts;
const pager = products.pager;
- const productsLength = CTX.state.products.length;
+ const productsLength = CTX.state?.products?.length || 0;
const filter = CTX.state.filter;
const isChecked = useMemo(
() => Boolean(Number(searchParams.get("isActive"))),
[searchParams]
);
+
+ const specialOffer = useMemo(
+ () => Boolean(Number(searchParams.get("specialOffer"))),
+ [searchParams]
+ );
const selectedBrands = useMemo(
() =>
searchParams.get("brandIds")
@@ -148,6 +153,7 @@ export default function CategoriesData({ params, products }) {
sortBy={sortBy}
isRangePrice={isRangePrice}
filter={filter}
+ specialOffer={specialOffer}
/>
diff --git a/components/Category/FilterCategory/page.jsx b/components/Category/FilterCategory/page.jsx
index 32d09c6..9f41890 100644
--- a/components/Category/FilterCategory/page.jsx
+++ b/components/Category/FilterCategory/page.jsx
@@ -14,6 +14,7 @@ const FilterCategory = ({
sortBy,
isRangePrice,
theme,
+ specialOffer,
filter,
}) => {
const pathname = usePathname();
@@ -37,6 +38,18 @@ const FilterCategory = ({
router.push(`${pathname}?${params}`);
};
+ const handleSpecialOfferChange = () => {
+ // CTX.setIsChecked(!isChecked);
+ const params = new URLSearchParams(searchParams.toString());
+ if (!specialOffer) {
+ params.set("specialOffer", Number(!specialOffer));
+ } else {
+ params.delete("specialOffer");
+ }
+ params.set("page", "0");
+ router.push(`${pathname}?${params}`);
+ };
+
const handleRangeChange = (values) => {
// CTX.setIsRangePrice(true);
@@ -180,6 +193,7 @@ const FilterCategory = ({
))}
+
+
+
+ فقط پیشنهاد های ویژه{" "}
+
+
+ Enable notifications
+
+
+
+
{/* {
>
-
ترند ها
+
مرتب سازی
diff --git a/components/LandingPage/BeautySection/page.jsx b/components/LandingPage/BeautySection/page.jsx
index 28b1b80..fb54071 100644
--- a/components/LandingPage/BeautySection/page.jsx
+++ b/components/LandingPage/BeautySection/page.jsx
@@ -26,9 +26,9 @@ const BeautySection = ({ data }) => {
-
- لوازم بهداشتی زیبایی{" "}
-
+
+ آرایش صورت وسمه{" "}
+
{
@@ -63,7 +63,7 @@ const BetweenSexualSection = () => {
diff --git a/components/LandingPage/HeroSection/page.jsx b/components/LandingPage/HeroSection/page.jsx
index c547c5d..131d16c 100644
--- a/components/LandingPage/HeroSection/page.jsx
+++ b/components/LandingPage/HeroSection/page.jsx
@@ -12,7 +12,7 @@ const HeroSection = () => {
- وسمه ، بُن مضـــــــــــارع زیبایی
+ وسمه ، بُن مضارع زیبایی
زیبایی شما در اولویت ماست{" "}
diff --git a/components/LandingPage/SurpriseSection/page.jsx b/components/LandingPage/SurpriseSection/page.jsx
index 330c13b..42e42b3 100644
--- a/components/LandingPage/SurpriseSection/page.jsx
+++ b/components/LandingPage/SurpriseSection/page.jsx
@@ -1,5 +1,6 @@
import CardNormal from "@comp/Cards/CardNormal/page";
import TimerDown from "@comp/TimerDown/TimerDown";
+import Link from "next/link";
import { Swiper, SwiperSlide } from "swiper/react";
const SurpriseSection = ({ data }) => {
@@ -66,11 +67,16 @@ const SurpriseSection = ({ data }) => {
))}
- {/*
-
- مشاهده بیشتر{" "}
-
-
*/}
+
+
+
+ مشاهده بیشتر{" "}
+
+
+
);
diff --git a/components/Navbar/page.jsx b/components/Navbar/page.jsx
index 2c98ce0..85b3da0 100644
--- a/components/Navbar/page.jsx
+++ b/components/Navbar/page.jsx
@@ -482,7 +482,7 @@ const Navbar = ({ theme }) => {
diff --git a/src/app/categories/[...id]/page.jsx b/src/app/categories/[...id]/page.jsx
index ccccfd1..cb78cf4 100644
--- a/src/app/categories/[...id]/page.jsx
+++ b/src/app/categories/[...id]/page.jsx
@@ -40,11 +40,18 @@ export async function generateMetadata({ params }) {
// maxPrice
// sortBy
const fetchProducts = async (categoryId, searchParams) => {
- const { brandIds: brandIdsString, isActive, ...params } = searchParams;
+ const {
+ brandIds: brandIdsString,
+ isActive,
+ specialOffer,
+ ...params
+ } = searchParams;
+
const query = {
- categoryId,
+ ...(categoryId != 0 ? { categoryId } : {}),
page: 0,
...(!!isActive ? { isActive: !!isActive } : {}),
+ ...(!!specialOffer ? { specialOffer: !!specialOffer } : {}),
...params,
};
@@ -61,6 +68,7 @@ const fetchProducts = async (categoryId, searchParams) => {
if (!res.ok) return [];
const products = await res.json();
+ console.log("products++++++++++++++++++++++++++++++++", products);
return products;
} catch (error) {
return [];