This commit is contained in:
g
2025-12-15 18:09:38 +00:00
parent 0176f89cb7
commit f697181d00
89 changed files with 177 additions and 134 deletions

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
import React, { useState, useEffect, useCallback, useRef } from "react";
import { Package, ShoppingBag, Info, ExternalLink, Loader2, AlertTriangle } from "lucide-react";
@@ -237,7 +237,7 @@ export default function BuyerOrderInfo({ buyerId, chatId }: BuyerOrderInfoProps)
<div className="p-3 border-b">
<h4 className="font-medium text-sm">Customer Orders</h4>
<p className="text-xs text-muted-foreground">
{orders.length} {orders.length === 1 ? 'order' : 'orders'} ÔÇó Total: {formatPrice(
{orders.length} {orders.length === 1 ? 'order' : 'orders'} Total: {formatPrice(
orders.reduce((sum, order) => sum + order.totalPrice, 0)
)}
</p>
@@ -279,11 +279,11 @@ export default function BuyerOrderInfo({ buyerId, chatId }: BuyerOrderInfoProps)
<div className="flex justify-between items-center text-xs text-muted-foreground pl-5">
<div className="flex gap-1">
<span>{order.products.length} {order.products.length === 1 ? 'product' : 'products'}</span>
<span></span>
<span>·</span>
<span>{formatPrice(order.totalPrice)}</span>
{isOrderUnderpaid(order) && (
<>
<span></span>
<span>·</span>
<span className="text-red-500">Underpaid</span>
</>
)}
@@ -299,4 +299,4 @@ export default function BuyerOrderInfo({ buyerId, chatId }: BuyerOrderInfoProps)
</Tooltip>
</TooltipProvider>
);
}
}