adrianhajdin / project_e_commerce

This is a code repository for the corresponding video tutorial. In this video, we're going to build a fully functional eCommerce application using commerce.js.
https://jsmastery.pro
1.88k stars 504 forks source link

please help i get this error when i go for payment option #31

Open ParvinderSheoran opened 3 years ago

ParvinderSheoran commented 3 years ago

× ←→1 of 6 errors on the page TypeError: props.render is not a function Controller C:/Users/parvi/Desktop/src/controller.tsx:4 1 | import { ControllerProps, FieldPath, FieldValues } from './types'; 2 | import { useController } from './useController'; 3 |

4 | const Controller = < 5 | TFieldValues extends FieldValues = FieldValues, 6 | TName extends FieldPath = FieldPath, 7 | >( View compiled ▶ 18 stack frames were collapsed. generateToken C:/Users/parvi/Desktop/test/src/components/CheckoutForm/Checkout/Checkout.jsx:28 25 | try { 26 | const token = await commerce.checkout.generateToken(cart.id, { type: 'cart' }); 27 | 28 | setCheckoutToken(token); | ^ 29 | } catch { 30 | if (activeStep !== steps.length) history.push('/'); 31 | } View compiled