I want users to be able to click Buy button and that will redirect to a checkout component (go to a new page and show the checkout component). How do I show the Checkout component when users click Buy button ?
Checkout Component also requires a prop (price of item). How do I do this: after clicking the button?
Button code:
<Button
className={classes.root}
variant="contained"
color="primary"
disabled={loading}
>
Buy Coupon
</Button>
My Checkout Component takes in Price/Amount:
const CheckoutForm = ({ price }) ....
Is this on the right track? :
<Route exact path="/checkout" render={(props) => <Checkout {...props}/>}/>