diff --git a/src/app/product/[id]/page.tsx b/src/app/product/[id]/page.tsx index c43bb8f..83a3cc8 100644 --- a/src/app/product/[id]/page.tsx +++ b/src/app/product/[id]/page.tsx @@ -11,6 +11,7 @@ import { import ProductImage from '../components/ProductImage' import BaseInformation from '../components/BaseInformation' import ShopInformation from '../components/ShopInformation' +import Specifications from '../components/Specifications' const SingleProduct: NextPage = () => { return ( @@ -40,6 +41,11 @@ const SingleProduct: NextPage = () => { + +
+ +
+
) } diff --git a/src/app/product/components/ShopInformation.tsx b/src/app/product/components/ShopInformation.tsx index b3aa20c..52f1b5e 100644 --- a/src/app/product/components/ShopInformation.tsx +++ b/src/app/product/components/ShopInformation.tsx @@ -5,7 +5,7 @@ import React from 'react' const ShopInformation = () => { return ( -
+
فروشنده
diff --git a/src/app/product/components/Specifications.tsx b/src/app/product/components/Specifications.tsx new file mode 100644 index 0000000..82ae7ba --- /dev/null +++ b/src/app/product/components/Specifications.tsx @@ -0,0 +1,64 @@ +import { FC, Fragment } from 'react' +import { Separator } from '@/components/ui/separator' + +type SpecItem = { + label: string + value: string | string[] +} + +const SPEC_ITEMS: SpecItem[] = [ + { label: 'ابعاد', value: 'میلی‌متر 163.3×79×8.6' }, + { label: 'وزن', value: '233 گرم' }, + { label: 'توضیحات سیم کارت', value: 'سایز نانو (12.3 × 8.8 میلی‌متر)' }, + { + label: 'ویژگی‌های خاص', + value: [ + 'مجهز به حس‌گر اثرانگشت', + 'مقاوم در برابر آب', + 'مناسب بازی', + 'مناسب عکاسی', + 'مناسب عکاسی سلفی', + ], + }, + { label: 'تعداد سیم کارت', value: 'دو عدد' }, +] + +const Specifications: FC = () => { + return ( +
+
+

مشخصات

+
+
+ +
+ {SPEC_ITEMS.map((item, index) => ( + +
+
+ {item.label} + +
+
+ {Array.isArray(item.value) ? ( +
+ {item.value.map((v) => ( +
{v}
+ ))} +
+ ) : ( +
{item.value}
+ )} +
+
+ {index !== SPEC_ITEMS.length - 1 && } +
+ ))} +
+
+ ) +} + +export default Specifications + +