web2019/static/js/shop/SummaryTotalPrice.jsx
Egor Savkin 15d9124025 Cache total price calculation
Signed-off-by: Egor Savkin <es@m-labs.hk>
2024-02-15 12:17:19 +08:00

17 lines
547 B
JavaScript

import {useShopStore} from "./shop_store";
import {formatMoney} from "./utils";
import React from "react";
export function SummaryTotalPrice() {
const currency = useShopStore((state) => state.currency);
const total_price = useShopStore((state) => state.total_order_price);
return (
<div>
{currency} {formatMoney(total_price)}
<button style={{'opacity': '0', 'cursor': 'initial'}}>
<img src="/images/shop/icon-remove.svg" alt="icon remove"/>
</button>
</div>
)
}