Skip to content

Commit

Permalink
fix: orders page pricing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RookieProgrammerSachin committed Sep 26, 2024
1 parent 51dc6ea commit b3fbc9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/components/orderdetails-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ export default function OrderDetailsModal({ order }) {
#{order.orderId}
</h1>
<span className='md:text-lg w-fit'>
{Number(order.orderTotal).toLocaleString("en-IN")}
{Math.ceil(order.orderTotal + order.deliveryCharges)}
</span>
</div>
<div className='p-2 md:p-4'>
<div className='flex justify-between items-center mb-4'>
<h1>Shipping Charges</h1>
<h1 className='text-sm text-black'>
{Math.round((order.orderTotal - prodTotal) * 100) / 100}
{order.deliveryCharges}
</h1>
</div>
{order.orderItems.map((item) => (
Expand All @@ -107,11 +107,11 @@ export default function OrderDetailsModal({ order }) {
</span>
<span className='text-black'>
{Number(
{Math.ceil(Number(
((item.product.total * (100 - item.product.discount)) /
100) *
item.quantity
).toLocaleString("en-IN")}
))}
</span>
</div>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const MODE = "dev";
export const MODE = "prod";
const DEV_API_URL = "http://localhost:8080";
const PROD_API_URL = "https://spring-madrasda-2f6mra4vwa-em.a.run.app";
export const API_URL = MODE === "dev" ? DEV_API_URL: PROD_API_URL;

0 comments on commit b3fbc9c

Please sign in to comment.