priority
parent
4acdd5d9af
commit
086b6da97d
|
@ -8,7 +8,7 @@ import Link from "next/link";
|
|||
import PersianNumber from "plugins/PersianNumber";
|
||||
import AddToCart from "../Components/AddToCart/page";
|
||||
|
||||
const CardSurprise = ({ data }) => {
|
||||
const CardSurprise = ({ data, priority }) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const cart = CTX.state.cart;
|
||||
return (
|
||||
|
@ -45,6 +45,7 @@ const CardSurprise = ({ data }) => {
|
|||
height={100}
|
||||
className="xs:!w-[110px] lg:!w-[130px] mx-auto !object-cover"
|
||||
alt={`${data.persianName} - ${data.englishName}`}
|
||||
priority={!!priority}
|
||||
/>
|
||||
) : (
|
||||
<div className="xs:!w-[85px] lg:!w-[85px] h-[90px] mt-10 ">
|
||||
|
|
|
@ -56,7 +56,7 @@ const HomeSection = ({ data }) => {
|
|||
>
|
||||
{data?.map((e, index) => (
|
||||
<SwiperSlide key={index}>
|
||||
<CardSurprise data={e} />
|
||||
<CardSurprise data={e} priority />
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
|
|
|
@ -53,13 +53,12 @@ export default function Page() {
|
|||
<HeroSection />
|
||||
</div>
|
||||
|
||||
<BeautySection data={cosmeticData?.products} />
|
||||
<SurpriseSection data={specialOfferData?.products} />
|
||||
|
||||
<BetweenSexualSection />
|
||||
<BrandsLogoSection />
|
||||
<SurpriseSection data={specialOfferData?.products} />
|
||||
|
||||
{/* <BeautySection data={cosmeticData?.products} /> */}
|
||||
<BeautySection data={cosmeticData?.products} />
|
||||
<HomeSection data={HomeCosmeticData?.products} />
|
||||
<Footer />
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue