File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import type { CartItem } from "@/types/cart-item" ;
22
33/*
4- Example usage 1,
4+ Example usage 1,
55 const items = [
66 {
77 priceBeforeTax: 19.99,
@@ -18,7 +18,7 @@ import type { CartItem } from "@/types/cart-item";
1818 ];
1919 const tax = 0.07;
2020 const total = calculateCartTotal(items, tax);
21- cosole.log(total); // { status: "success", total: "36.18 " }
21+ cosole.log(total); // { status: "success", total: "38.49 " }
2222
2323
2424 --------------------------------------------
@@ -45,8 +45,8 @@ import type { CartItem } from "@/types/cart-item";
4545 const total = calculateCartTotal(items, tax);
4646 cosole.log(total); // { status: "error", message: "Cart has duplicate items" }
4747 */
48-
49- type CartTotalResult =
48+
49+ type CartTotalResult =
5050 | { status : "success" ; total : string }
5151 | { status : "error" ; message : string } ;
5252
You can’t perform that action at this time.
0 commit comments