master
حسین معصومی پور 2024-03-03 22:43:04 +03:30
parent 4acdd5d9af
commit 086b6da97d
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ import Link from "next/link";
import PersianNumber from "plugins/PersianNumber"; import PersianNumber from "plugins/PersianNumber";
import AddToCart from "../Components/AddToCart/page"; import AddToCart from "../Components/AddToCart/page";
const CardSurprise = ({ data }) => { const CardSurprise = ({ data, priority }) => {
const CTX = useContext(AppContext); const CTX = useContext(AppContext);
const cart = CTX.state.cart; const cart = CTX.state.cart;
return ( return (
@ -45,6 +45,7 @@ const CardSurprise = ({ data }) => {
height={100} height={100}
className="xs:!w-[110px] lg:!w-[130px] mx-auto !object-cover" className="xs:!w-[110px] lg:!w-[130px] mx-auto !object-cover"
alt={`${data.persianName} - ${data.englishName}`} alt={`${data.persianName} - ${data.englishName}`}
priority={!!priority}
/> />
) : ( ) : (
<div className="xs:!w-[85px] lg:!w-[85px] h-[90px] mt-10 "> <div className="xs:!w-[85px] lg:!w-[85px] h-[90px] mt-10 ">

View File

@ -56,7 +56,7 @@ const HomeSection = ({ data }) => {
> >
{data?.map((e, index) => ( {data?.map((e, index) => (
<SwiperSlide key={index}> <SwiperSlide key={index}>
<CardSurprise data={e} /> <CardSurprise data={e} priority />
</SwiperSlide> </SwiperSlide>
))} ))}
</Swiper> </Swiper>

View File

@ -53,13 +53,12 @@ export default function Page() {
<HeroSection /> <HeroSection />
</div> </div>
<BeautySection data={cosmeticData?.products} /> <SurpriseSection data={specialOfferData?.products} />
<BetweenSexualSection /> <BetweenSexualSection />
<BrandsLogoSection /> <BrandsLogoSection />
<SurpriseSection data={specialOfferData?.products} />
{/* <BeautySection data={cosmeticData?.products} /> */} <BeautySection data={cosmeticData?.products} />
<HomeSection data={HomeCosmeticData?.products} /> <HomeSection data={HomeCosmeticData?.products} />
<Footer /> <Footer />
</> </>