From 2d145b026cfdf54a63bef0b9d6324b6785390307 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 14 Sep 2018 12:18:12 -0400 Subject: move finished folder --- stepped-solutions/FINISHED/frontend/lib/calcTotalPrice.js | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 stepped-solutions/FINISHED/frontend/lib/calcTotalPrice.js (limited to 'stepped-solutions/FINISHED/frontend/lib/calcTotalPrice.js') diff --git a/stepped-solutions/FINISHED/frontend/lib/calcTotalPrice.js b/stepped-solutions/FINISHED/frontend/lib/calcTotalPrice.js deleted file mode 100644 index 4822468..0000000 --- a/stepped-solutions/FINISHED/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