I am using the Stripe Pricing Table, but it flickers into view. How can I stop the flicker and remove the animation?
And this is my React page:
import { Shell } from '@/components/shells/shell'
import { getSessionUser } from '@/lib/db/users'
import Stripe from '@/lib/stripe'
export default async function Page() {
const user = await getSessionUser()
return (
<Shell>
<div className="mx-auto w-full max-w-6xl">
<script async src="https://js.stripe.com/v3/pricing-table.js"></script>
<div
dangerouslySetInnerHTML={{
__html: `<stripe-pricing-table
pricing-table-id="${Stripe.pricingTableID}"
publishable-key="${Stripe.publishableKey}"
client-reference-id="${user.id}"
></stripe-pricing-table>`,
}}
/>
</div>
</Shell>
)
}
2
Answers
You should try the following:
(source)
Based on the information on Stripe doc. I’m afraid that there’s no option to remove the loading animation for a pricing table.