#Off_set

1 messages · Page 1 of 1 (latest)

twilit gulchBOT
fathom crater
#

Hi there!

#

What is your question exactly?

grave cliff
#

so whenever I put this line in my code, the payment page just goes blank

fathom crater
#

What are you trying to do? What error message do you see?

grave cliff
#

The above error occurred in the <Elements> component: i see this

grave cliff
fathom crater
#

What's the full error message?

grave cliff
#
The above error occurred in the <Elements> component:

    at Elements (http://localhost:3000/static/js/bundle.js:149049:30)
    at RenderedRoute (http://localhost:3000/static/js/bundle.js:95751:5)
    at Routes (http://localhost:3000/static/js/bundle.js:96215:5)
    at Router (http://localhost:3000/static/js/bundle.js:96146:15)
    at BrowserRouter (http://localhost:3000/static/js/bundle.js:94316:5)
    at App
    at StateProvider (http://localhost:3000/static/js/bundle.js:2512:5)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
#

well

fathom crater
#

Sorry for the delay.

#

Is that the full error message?

#

Can you try to simply your code by removing your Route and only trying <Elements stripe={promise}><Payment /></Elements> to see if it works (and if not what error you see)?

grave cliff
#

Uncaught Error: [Elements] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment> i see this error

fathom crater
#

Well this just means you are using both <Route> and <Elements> in <Routes>, which is not possible.

grave cliff
#

oh my bad, is there different approach?

fathom crater
#

Could you completely remove the routes for now, just to test this code? <Elements stripe={promise}><Payment /></Elements>

grave cliff
#

4

#

if i remove the routes, my whole website goes blank eh

real bone
#

Hello, apologies but I just caught up on this thread. Are you saying that that would be difficult to remove for a quick test or are you saying it wouldn't be possible to remove this and have your site still work?