Commit d737aa3f authored by Christopher Cottier's avatar Christopher Cottier

full checkout and order flow, protected from users who are not logged in

parent a0363409
...@@ -24,7 +24,7 @@ export default function SubmitOrder(props) { ...@@ -24,7 +24,7 @@ export default function SubmitOrder(props) {
<button <button
id="SubmitButtonInput" id="SubmitButtonInput"
onClick={() => {handleSubmitClick()}} onClick={() => {handleSubmitClick()}}
disabled={currentUser ? false : true} >Submit Order</button> >Submit Order</button>
</div> </div>
</div> </div>
......
...@@ -90,7 +90,7 @@ export default function ShoppingCart() { ...@@ -90,7 +90,7 @@ export default function ShoppingCart() {
}, [cartItems]) }, [cartItems])
if (!userSession) return <Redirect to="/product-market" /> //if (!userSession) return <Redirect to="/product-market" />
return ( return (
<div id="shoppingCartContainer"> <div id="shoppingCartContainer">
...@@ -110,9 +110,16 @@ export default function ShoppingCart() { ...@@ -110,9 +110,16 @@ export default function ShoppingCart() {
})} })}
</div> </div>
<Link id="checkoutButtonContainer" to="/checkout"> {
<button id="checkoutButton">Proceed To Checkout</button> cartItems.length > 0 ? (
</Link> <Link id="checkoutButtonContainer" to="/checkout">
<button id="checkoutButton">Proceed To Checkout</button>
</Link>
) : (
<div>Add more items to your cart!</div>
)
}
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment