bug fix
This commit is contained in:
@@ -83,7 +83,7 @@ const HistoryTabs = () => {
|
|||||||
|
|
||||||
{/* Orders List */}
|
{/* Orders List */}
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
{data.map((order: OrderList) => {
|
{data?.map((order: OrderList) => {
|
||||||
const totalPrice = order.items.reduce(
|
const totalPrice = order.items.reduce(
|
||||||
(sum, item) => sum + Number(item.price) * item.quantity,
|
(sum, item) => sum + Number(item.price) * item.quantity,
|
||||||
0,
|
0,
|
||||||
@@ -144,7 +144,7 @@ const HistoryTabs = () => {
|
|||||||
|
|
||||||
{/* Products */}
|
{/* Products */}
|
||||||
<div className="p-4 space-y-3">
|
<div className="p-4 space-y-3">
|
||||||
{order.items.map((item, index) => {
|
{order?.items?.map((item, index) => {
|
||||||
const product = item.product;
|
const product = item.product;
|
||||||
|
|
||||||
// Get product image
|
// Get product image
|
||||||
@@ -212,8 +212,7 @@ const HistoryTabs = () => {
|
|||||||
{t('Miqdor')}
|
{t('Miqdor')}
|
||||||
</span>
|
</span>
|
||||||
<span className="text-base font-bold text-gray-900">
|
<span className="text-base font-bold text-gray-900">
|
||||||
{item.quantity}{' '}
|
{item?.quantity}
|
||||||
{product.meansurement || t('dona')}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col items-end">
|
<div className="flex flex-col items-end">
|
||||||
|
|||||||
Reference in New Issue
Block a user