Skip to content

Instantly share code, notes, and snippets.

@qstrahl
Created September 22, 2016 16:00
Show Gist options
  • Save qstrahl/e33b00e02adfcda7cea8a432cd961d9c to your computer and use it in GitHub Desktop.
Save qstrahl/e33b00e02adfcda7cea8a432cd961d9c to your computer and use it in GitHub Desktop.
const PlanSummary = ({ user, ...props }, { formatCurrency }) => {
const { name, spouse, child, monthlyPayments, incomeSources } = user;
const monthlyPayment = values(monthlyPayments).map(n => (isNumber(n) ? n : 0)).reduce((a, b) => a + b);
const income = values(incomeSources).map(n => (isNumber(n) ? n : 0)).reduce((a, b) => a + b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment