forked from M-Labs/web2019
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import {useShopStore} from "./shop_store";
|
|
import {SummaryCrates} from "./SummaryCrates";
|
|
import {SummaryTotalPrice} from "./SummaryTotalPrice";
|
|
|
|
// #!render_count
|
|
import {useRenderCount} from "@uidotdev/usehooks";
|
|
|
|
|
|
/**
|
|
* Components that displays the list of card that are used in the crate.
|
|
* It is a summary of purchase
|
|
*/
|
|
export function OrderSummary() {
|
|
// #!render_count
|
|
const renderCount = useRenderCount();
|
|
|
|
// #!render_count
|
|
console.log("OrderSummary renders: ", renderCount)
|
|
|
|
return (
|
|
<div className="summary-price">
|
|
|
|
<table>
|
|
<SummaryCrates/>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td className="item-card-name">Price estimate</td>
|
|
<td className="price">
|
|
<SummaryTotalPrice/>
|
|
|
|
<span style={{
|
|
'display': 'inline-block',
|
|
'width': '30px',
|
|
}}> </span>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
);
|
|
} |