diff --git a/components/Category/FilterCategory/page.jsx b/components/Category/FilterCategory/page.jsx
index b233122..eeffc64 100644
--- a/components/Category/FilterCategory/page.jsx
+++ b/components/Category/FilterCategory/page.jsx
@@ -202,7 +202,8 @@ const FilterCategory = ({
/>
-
-
- {/*
-
-
*/}
-
+ */}
diff --git a/components/Category/Mobile/Component/SearchSideBar/page.jsx b/components/Category/Mobile/Component/SearchSideBar/page.jsx
index e074bc2..0f7916e 100644
--- a/components/Category/Mobile/Component/SearchSideBar/page.jsx
+++ b/components/Category/Mobile/Component/SearchSideBar/page.jsx
@@ -20,6 +20,7 @@ const SearchSideBar = () => {
if (CTX.state.closeNavbar) {
inputRef.current.focus();
}
+ setSearchValue("");
}, [CTX.state.closeNavbar]);
const handleInputChange = (event) => {
diff --git a/components/LandingPage/SurpriseSection/page.jsx b/components/LandingPage/SurpriseSection/page.jsx
index ba6d0fe..e7a6651 100644
--- a/components/LandingPage/SurpriseSection/page.jsx
+++ b/components/LandingPage/SurpriseSection/page.jsx
@@ -62,7 +62,7 @@ const SurpriseSection = ({ data }) => {
>
{data?.map((e, index) => (
-
+
))}
diff --git a/components/Navbar/ResultSearchBar/page.jsx b/components/Navbar/ResultSearchBar/page.jsx
index 930e53e..7591b43 100644
--- a/components/Navbar/ResultSearchBar/page.jsx
+++ b/components/Navbar/ResultSearchBar/page.jsx
@@ -1,12 +1,15 @@
import Image from "next/image";
import Link from "next/link";
-import React from "react";
+import React, { useContext } from "react";
import logoBlack from "../../../public/images/logo.png";
+import AppContext from "@ctx/AppContext";
const ResultSearchBar = ({
searchResultProductData,
searchResultCategoryData,
}) => {
+ const CTX = useContext(AppContext);
+
return (
<>
@@ -37,14 +40,20 @@ const ResultSearchBar = ({
-
+
CTX.setCloseNavbar(false)}
+ >
شامپو بدن
-
+
CTX.setCloseNavbar(false)}
+ >
کرم مرطوب کننده دست و پا
@@ -52,7 +61,10 @@ const ResultSearchBar = ({
-
+
CTX.setCloseNavbar(false)}
+ >
شوینده ظروف
@@ -66,7 +78,10 @@ const ResultSearchBar = ({
key={index}
href={`/categories/${e.id}/${e.name.split(" ").join("-")}`}
>
-
+
CTX.setCloseNavbar(false)}
+ >
{" "}
@@ -87,7 +102,10 @@ const ResultSearchBar = ({
key={index}
href={`/products/${e.id}/${e.persianName.split(" ").join("-")}`}
>
-
+
CTX.setCloseNavbar(false)}
+ >
{!!e.mainImage ? (
diff --git a/src/app/products/[...id]/page.jsx b/src/app/products/[...id]/page.jsx
index 019c87e..7de6e37 100644
--- a/src/app/products/[...id]/page.jsx
+++ b/src/app/products/[...id]/page.jsx
@@ -11,7 +11,7 @@ export async function generateMetadata({ params }) {
const decodedName = decodeURIComponent(params.id[1]);
const imageUrl = new URL(
- data?.product?.files && data?.product?.files[0].fileLocation,
+ data?.product?.files && data?.product?.files[0]?.fileLocation,
process.env.STORAGE_URL
);
console.log("dddddd", imageUrl);