-
+
data?.results?.banners?.[1]?.linkUrl && window.open(data.results.banners[1].linkUrl, '_blank')}>
+
-
+
data?.results?.banners?.[2]?.linkUrl && window.open(data.results.banners[2].linkUrl, '_blank')}>
-
+
data?.results?.banners?.[0]?.linkUrl && window.open(data.results.banners[0].linkUrl, '_blank')}>
diff --git a/src/app/home/components/Carousel.tsx b/src/app/home/components/Carousel.tsx
index cba8601..b3b408f 100644
--- a/src/app/home/components/Carousel.tsx
+++ b/src/app/home/components/Carousel.tsx
@@ -32,7 +32,10 @@ const Carousel: FC = () => {
{sliders.map((slider) => (
-
+
slider.linkUrl && window.open(slider.linkUrl, '_blank')}
+ >
= ({ item }) => {
}
*/}
-
- {NumberFormat(item.default_variant.price.selling_price)} تومان
-
-
- {NumberFormat(item.default_variant.price.retailPrice)}
+
+
+
+ {item.default_variant.price.selling_price && item.default_variant.price.selling_price > 0
+ ? `${NumberFormat(item.default_variant.price.selling_price)} تومان`
+ : 'بدون قیمت'
+ }
+
+ {((item.default_variant.price.discount_percent > 0 && item.default_variant.price.selling_price > 0) ||
+ (item.default_variant.price.is_specialSale && item.default_variant.price.selling_price > 0)) && (
+
+ {NumberFormat(item.default_variant.price.retailPrice)}
+
+ )}
+
+ {((item.default_variant.price.discount_percent > 0 && item.default_variant.price.selling_price > 0) ||
+ (item.default_variant.price.is_specialSale && item.default_variant.price.selling_price > 0)) && (
+
+ {item.default_variant.price.discount_percent > 0
+ ? `${item.default_variant.price.discount_percent}%`
+ : 'فروش ویژه'
+ }
+
+ )}
-
+
diff --git a/src/share/Header.tsx b/src/share/Header.tsx
index 2a82d99..9514869 100644
--- a/src/share/Header.tsx
+++ b/src/share/Header.tsx
@@ -10,6 +10,7 @@ import { getToken } from '@/config/func'
import Account from './components/Account'
import Cart from './components/Cart'
import Image from 'next/image'
+import Link from 'next/link'
const Header: FC = () => {
@@ -42,7 +43,7 @@ const Header: FC = () => {
-
+
{
height={100}
className='max-w-[100px] w-[100px] max-h-[40px] object-contain'
/>
-
+