MCPcopy
hub / github.com/react-designer/react-designer / calculatePrice

Function calculatePrice

examples/components/TshirtDesigner.js:11–20  ·  view source on GitHub ↗
(objects,
                        initialCost = 5)

Source from the content-addressed store, hash-verified

9};
10
11const calculatePrice = (objects,
12 initialCost = 5) => (
13 objects.map(
14 ({type, ...rest}) =>
15 priceMap[type](rest)
16 ).reduce(
17 (a, b) => a + b,
18 initialCost
19 )
20);
21
22const Background = ({style}) => (
23 <svg width="350" height="400" style={{

Callers 1

TshirtDesigner.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected