Last active
December 17, 2020 20:49
-
-
Save peaceintheheart/33fc4af4d40b6c0d2b3a101f65f7e8b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Option from "../Option/Option"; | |
import Total from "../Total/Total"; | |
export default function MainSummary(props) { | |
const { USCurrencyFormat } = props; | |
const summary = Object.keys(props.selected).map((feature, idx) => { | |
const featureHash = feature + "-" + idx; | |
const selectedOption = props.selected[feature]; | |
return ( | |
<Option | |
featureHash={featureHash} | |
selectedOption={selectedOption} | |
feature={feature} | |
summary={summary} | |
/> | |
); | |
}); | |
return ( | |
<section> | |
<div> | |
{summary} | |
</div> | |
<Total | |
selected={props.selected} | |
USCurrencyFormat={props.USCurrencyFormat} | |
/> | |
</section> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment