move stripe out of head

main
Mike Fix 5 years ago
parent 7fc7c9ff22
commit d186958075
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -1,4 +1,5 @@
import React from 'react' import React from 'react'
import { Head } from 'next'
import { Elements, StripeProvider, CardElement, injectStripe } from 'react-stripe-elements' import { Elements, StripeProvider, CardElement, injectStripe } from 'react-stripe-elements'
import { useAsyncCallback } from 'actionsack' import { useAsyncCallback } from 'actionsack'
@ -270,6 +271,9 @@ export default function() {
return ( return (
<StripeProvider stripe={stripe}> <StripeProvider stripe={stripe}>
<Elements> <Elements>
<Head>
<script src="https://js.stripe.com/v3/" />
</Head>
<BillingWithStripe /> <BillingWithStripe />
</Elements> </Elements>
</StripeProvider> </StripeProvider>

@ -5,9 +5,7 @@ export default class extends Document {
render() { render() {
return ( return (
<html lang="en"> <html lang="en">
<Head> <Head />
<script src="https://js.stripe.com/v3/" />
</Head>
<body> <body>
<Main /> <Main />
<NextScript /> <NextScript />

Loading…
Cancel
Save