This commit is contained in:
Samandar Turgunboyev
2026-02-12 16:56:48 +05:00
parent 72c46a296c
commit ed4601b8e8

View File

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