priority
parent
4acdd5d9af
commit
086b6da97d
|
@ -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 ">
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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 />
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue