Skip to content

Commit

Permalink
Convert payment status to uppercase in MyOrder component
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossen27 committed Apr 30, 2024
1 parent 08c9f2e commit 7da77e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/order/MyOrder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const MyOrders = () => {
const setOrders = () => {
const orders = [];
ordersData?.orders?.forEach((order) => {
const paymentStatus = order?.paymentInfo?.status;
const paymentStatus = order?.paymentInfo?.status.toUpperCase();
const isPaid = paymentStatus === "paid";
const statusText = isPaid ? "已付款" : "尚未付款";
const statusColor = isPaid ? "text-green-500" : "text-red-500";
Expand Down

0 comments on commit 7da77e3

Please sign in to comment.