From b1600adec47a04f60e1da07d94a3ed3906ff5aee Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 14 Jun 2018 16:44:21 -0400 Subject: starter files --- frontend/lib/calcTotalPrice.js | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 frontend/lib/calcTotalPrice.js (limited to 'frontend/lib/calcTotalPrice.js') diff --git a/frontend/lib/calcTotalPrice.js b/frontend/lib/calcTotalPrice.js deleted file mode 100644 index 4822468..0000000 --- a/frontend/lib/calcTotalPrice.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function calcTotalPrice(cart) { - return cart.reduce((tally, cartItem) => { - if (!cartItem.item) return tally; - return tally + cartItem.quantity * cartItem.item.price; - }, 0); -} -- cgit v1.3