search fix
parent
8358f25133
commit
20fdbd4385
|
@ -202,7 +202,8 @@ const FilterCategory = ({
|
|||
/>
|
||||
</Switch>
|
||||
</div>
|
||||
<div
|
||||
|
||||
{/* <div
|
||||
className={` p-5 border-gray-300 rounded-lg mt-3 ${
|
||||
theme == 2 ? "bg-gray-100" : "bg-gray-50"
|
||||
} `}
|
||||
|
@ -251,16 +252,7 @@ const FilterCategory = ({
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* <div className="mt-4">
|
||||
<button
|
||||
className="btn btn-primary w-full rounded-full text-sm "
|
||||
onClick={() => handleRangePriceFilter()}
|
||||
>
|
||||
اعمال فیلتر
|
||||
</button>
|
||||
</div> */}
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -20,6 +20,7 @@ const SearchSideBar = () => {
|
|||
if (CTX.state.closeNavbar) {
|
||||
inputRef.current.focus();
|
||||
}
|
||||
setSearchValue("");
|
||||
}, [CTX.state.closeNavbar]);
|
||||
|
||||
const handleInputChange = (event) => {
|
||||
|
|
|
@ -62,7 +62,7 @@ const SurpriseSection = ({ data }) => {
|
|||
>
|
||||
{data?.map((e, index) => (
|
||||
<SwiperSlide key={index}>
|
||||
<CardNormal data={e} />
|
||||
<CardNormal data={e} priority />
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
|
|
|
@ -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 (
|
||||
<>
|
||||
<div>
|
||||
|
@ -37,14 +40,20 @@ const ResultSearchBar = ({
|
|||
<Link
|
||||
href={`/categories/fac3ee2d-19dd-4229-a412-28a1d09cc948/شامپو-بدن`}
|
||||
>
|
||||
<div className="border-2 border-gray-300 py-1 px-3 rounded-full mt-1 mb-2 mx-[2px] cursor-pointer">
|
||||
<div
|
||||
className="border-2 border-gray-300 py-1 px-3 rounded-full mt-1 mb-2 mx-[2px] cursor-pointer"
|
||||
onClick={() => CTX.setCloseNavbar(false)}
|
||||
>
|
||||
<p className="mb-0 text-[12px]">شامپو بدن</p>
|
||||
</div>
|
||||
</Link>
|
||||
<Link
|
||||
href={`categories/bdf6b13c-4be5-4a93-bcdb-612440bdbd6e/کرم-مرطوب-کننده-دست-و-پا`}
|
||||
>
|
||||
<div className="border-2 border-gray-300 py-1 px-3 rounded-full mt-1 mb-2 mx-[2px] cursor-pointer">
|
||||
<div
|
||||
className="border-2 border-gray-300 py-1 px-3 rounded-full mt-1 mb-2 mx-[2px] cursor-pointer"
|
||||
onClick={() => CTX.setCloseNavbar(false)}
|
||||
>
|
||||
<p className="mb-0 text-[12px]">کرم مرطوب کننده دست و پا</p>
|
||||
</div>
|
||||
</Link>
|
||||
|
@ -52,7 +61,10 @@ const ResultSearchBar = ({
|
|||
<Link
|
||||
href={`categories/4d3c984d-a867-495c-a0b5-302316f39fb1/شوینده-ظروف`}
|
||||
>
|
||||
<div className="border-2 border-gray-300 py-1 px-3 rounded-full mt-1 mb-2 mx-[2px] cursor-pointer">
|
||||
<div
|
||||
className="border-2 border-gray-300 py-1 px-3 rounded-full mt-1 mb-2 mx-[2px] cursor-pointer"
|
||||
onClick={() => CTX.setCloseNavbar(false)}
|
||||
>
|
||||
<p className="mb-0 text-[12px]">شوینده ظروف</p>
|
||||
</div>
|
||||
</Link>
|
||||
|
@ -66,7 +78,10 @@ const ResultSearchBar = ({
|
|||
key={index}
|
||||
href={`/categories/${e.id}/${e.name.split(" ").join("-")}`}
|
||||
>
|
||||
<div className="flex ">
|
||||
<div
|
||||
className="flex "
|
||||
onClick={() => CTX.setCloseNavbar(false)}
|
||||
>
|
||||
<div className="w-[20px] h-[40px] rounded-2xl bg-gray-200 ml-2 mt-3">
|
||||
{" "}
|
||||
</div>
|
||||
|
@ -87,7 +102,10 @@ const ResultSearchBar = ({
|
|||
key={index}
|
||||
href={`/products/${e.id}/${e.persianName.split(" ").join("-")}`}
|
||||
>
|
||||
<div className="flex relative ">
|
||||
<div
|
||||
className="flex relative "
|
||||
onClick={() => CTX.setCloseNavbar(false)}
|
||||
>
|
||||
<div className="h-fit relative">
|
||||
<div className="w-[50px] h-[50px] rounded-2xl bg-gray-200 ml-2 mt-3 overflow-hidden relative ">
|
||||
{!!e.mainImage ? (
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue